aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/tests/test_forms.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-21 17:08:24 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-21 17:08:35 +0100
commitecd2c19b265e3974707da0d9b8e260749dcf4a9f (patch)
treea47b8e820e98e39fca7108c1f98bc500bf0c98d9 /ctrack/register/tests/test_forms.py
parent07c741c785761cfa0e9895e35ba7e1f1549ce676 (diff)
renamed a field in a model to date and look what I need! new migrations and fixed tests
Diffstat (limited to '')
-rw-r--r--ctrack/register/tests/test_forms.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/ctrack/register/tests/test_forms.py b/ctrack/register/tests/test_forms.py
index e059cdf..5a055b6 100644
--- a/ctrack/register/tests/test_forms.py
+++ b/ctrack/register/tests/test_forms.py
@@ -15,7 +15,7 @@ def test_init(user, org_with_people):
{
"type_descriptor": "MEETING", # Must be Meeting as that is in the choices param
"short_description": "Test short description",
- "datetime": "2010-10-10T13:00",
+ "date": "2010-10-10T13:00",
"comments": "Test Comments",
"location": "Transient Moats",
"participants": people_from_org
@@ -33,7 +33,7 @@ def test_simple_event_limited_to_org_participants(user, org, person):
{
"type_descriptor": "PHONE_CALL",
"short_description": "Test Short Description",
- "datetime": "2010-10-10 10:00",
+ "date": "2010-10-10 10:00",
"requested_response_date": "2020-12-24",
"response_received_date": "2020-12-25",
"participants": people_from_org,
@@ -49,7 +49,7 @@ def test_cannot_create_disallowed_single_date_event_type_with_form(user, org_wit
{
"type_descriptor": "NOT ALLOWED EVENT",
"short_description": "Test short description",
- "datetime": "2020-10-10",
+ "date": "2020-10-10",
"comments": "Test Comments",
"participants": org_with_people.get_people()
},
@@ -68,7 +68,7 @@ def test_create_simple_datetime_event(user, org_with_people):
{
"type_descriptor": "PHONE_CALL",
"short_description": "Test Short Description",
- "datetime": "2010-10-10 10:00",
+ "date": "2010-10-10 10:00",
"requested_response_date": "2020-12-24",
"response_received_date": "2020-12-25",
"url": "https://fake.url.com",
@@ -84,7 +84,7 @@ def test_response_date_cannot_be_before_date(user, org_with_people):
{
"type_descriptor": "PHONE_CALL",
"short_description": "Test Short Description",
- "datetime": "2010-10-10 10:00",
+ "date": "2010-10-10 10:00",
"requested_response_date": "2009-12-24",
"response_received_date": None,
"comments": "Test Comments not needed",
@@ -107,7 +107,7 @@ def test_meeting_blank_data(user, org_with_people):
user=user, org_slug=None
)
assert form.is_valid() is False
- assert form.errors == {"datetime": ["This field is required."]}
+ assert form.errors == {"date": ["This field is required."]}
def test_create_note(user, org_with_people):
@@ -214,7 +214,7 @@ def test_caf_twin_date_event(user, caf):
"type_descriptor": "CAF_PEER_REVIEW_PERIOD",
"related_caf": caf,
"short_description": "Test Description",
- "start_date": "2009-10-01",
+ "date": "2009-10-01",
"end_date": "2015-10-1",
"comments": "Meaningless comments",
},
@@ -230,7 +230,7 @@ def test_cannot_create_twin_date_event_for_caf_whose_end_date_is_open(allowed_ty
"type_descriptor": allowed_type,
"related_caf": caf,
"short_description": "caf peer review for x company",
- "start_date": "2020-10-10",
+ "date": "2020-10-10",
"comments": "nice comments for this event",
},
user=user,
@@ -240,7 +240,7 @@ def test_cannot_create_twin_date_event_for_caf_whose_end_date_is_open(allowed_ty
"type_descriptor": allowed_type,
"related_caf": caf,
"short_description": "caf peer review for x company",
- "start_date": "2020-10-10",
+ "date": "2020-10-10",
"comments": "nice comments for this event",
},
user=user,
@@ -249,7 +249,7 @@ def test_cannot_create_twin_date_event_for_caf_whose_end_date_is_open(allowed_ty
e1.save()
assert e2.is_valid() is False
assert e2.errors == {
- "start_date": ["You cannot have two CAF events starting on the same date."]
+ "date": ["You cannot have two CAF events starting on the same date."]
}
@@ -262,7 +262,7 @@ def test_cannot_create_twin_date_event_where_end_date_precedes_start(allowed_typ
"type_descriptor": allowed_type,
"related_caf": caf,
"short_description": "caf peer review for x company",
- "start_date": "2020-10-10",
+ "date": "2020-10-10",
"end_date": "2020-10-09",
"comments": "nice comments for this event",
},