Browse Source

Random functionality along with documentation and tests

Akash Singh 3 years ago
parent
commit
6e3f6dffe6
3 changed files with 3 additions and 3 deletions
  1. 1 1
      baangt/TestSteps/RandomValues.py
  2. 1 1
      docs/SimpleAPI.rst
  3. 1 1
      docs/simpleExample.rst

+ 1 - 1
baangt/TestSteps/RandomValues.py

@@ -49,7 +49,7 @@ class RandomValues:
             return flt
 
         elif self.RandomizationType.lower() == "date":
-            self.format = self.format or "%d/%m/%y"
+            self.format = self.format or "%d/%m/%Y"
             if self.min:
                 try:
                     self.min = datetime.datetime.strptime(self.min, self.format).timestamp()

+ 1 - 1
docs/SimpleAPI.rst

@@ -153,7 +153,7 @@ other optional fields as they are use less for it. You can see fields and types
      - date, time are the only types supporting format field. In above date examples date is in %d/%m/%Y format and
        time is in %H:%M:%S format. Here "%d" stands for the day, "%m" stands for month, "%Y" stands for year including
        century e.g.- 2020, if you want only year you can use "%y" e.g. 20. If you use min and max fields in date, time
-       then you must input its written format in format field, default will be ""%d/%m/%y" for date. Now if you want
+       then you must input its written format in format field, default will be ""%d/%m/%Y" for date. Now if you want
        date with "-" as seperator you can write format as "%d-%m-%Y" so the output would be like "31-01-2020".
 
        `examples`

+ 1 - 1
docs/simpleExample.rst

@@ -323,7 +323,7 @@ other optional fields as they are use less for it. You can see fields and types
      - date, time are the only types supporting format field. In above date examples date is in %d/%m/%Y format and
        time is in %H:%M:%S format. Here "%d" stands for the day, "%m" stands for month, "%Y" stands for year including
        century e.g.- 2020, if you want only year you can use "%y" e.g. 20. If you use min and max fields in date, time
-       then you must input its written format in format field, default will be ""%d/%m/%y" for date. Now if you want
+       then you must input its written format in format field, default will be ""%d/%m/%Y" for date. Now if you want
        date with "-" as seperator you can write format as "%d-%m-%Y" so the output would be like "31-01-2020".
 
        `examples`