Commit 4a3600fabae8b19a02b0a9180c780f8c72cbbe31

Authored by ivanka12
1 parent 0da9856d

add create_fake_period method

@@ -60,6 +60,14 @@ def create_fake_date(): @@ -60,6 +60,14 @@ def create_fake_date():
60 return get_now().isoformat() 60 return get_now().isoformat()
61 61
62 62
  63 +def create_fake_period(days=0, hours=0, minutes=0):
  64 + data = {
  65 + "startDate": get_now().isoformat(),
  66 + "endDate": (get_now() + timedelta(days=days, hours=hours, minutes=minutes)).isoformat()
  67 + }
  68 + return data
  69 +
  70 +
63 def subtraction(value1, value2): 71 def subtraction(value1, value2):
64 if "." in str (value1) or "." in str (value2): 72 if "." in str (value1) or "." in str (value2):
65 return (float (value1) - float (value2)) 73 return (float (value1) - float (value2))
@@ -23,6 +23,7 @@ from .initial_data import ( @@ -23,6 +23,7 @@ from .initial_data import (
23 create_fake_number, 23 create_fake_number,
24 create_fake_date, 24 create_fake_date,
25 create_fake_funder, 25 create_fake_funder,
  26 + create_fake_period,
26 get_fake_funder_scheme, 27 get_fake_funder_scheme,
27 fake, 28 fake,
28 subtraction, 29 subtraction,
Please register or login to post a comment