Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions website/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def test_form_data_view_passed(self):
"case_num": "CF-2020-1648",
"year": 2020,
"county": "Tulsa",
"phone_num": 918-555-5555,
"add_phone_num": 918-111-1111
"phone_num": "000-000-0000",
"add_phone_num": "000-000-0001"
}
resp = self.client.post("https://courtbot-python.herokuapp.com/form_data", data=data, follow=True)
resp = self.client.post("https://courtbot-python.herokuapp.com/schedule_reminders", data=data, follow=True)

self.assertIn(str.encode("Arraignment for case CF-2020-1648 has already passed"), resp.content)

Expand All @@ -24,10 +24,10 @@ def test_form_data_view_not_found(self):
"case_num": "1000000000",
"year": 2020,
"county": "Tulsa",
"phone_num": 918-555-5555,
"add_phone_num": 918-111-1111
"phone_num": "000-000-0000",
"add_phone_num": "000-000-0001"
}
resp = self.client.post("https://courtbot-python.herokuapp.com/form_data", data=data, follow=True)
resp = self.client.post("https://courtbot-python.herokuapp.com/schedule_reminders", data=data, follow=True)

self.assertIn(str.encode("Unable to find arraignment event with the following year 2020, county Tulsa, case number 1000000000"), resp.content)

Expand All @@ -36,10 +36,10 @@ def test_form_data_view_scheduled(self):
"case_num": "CF-2020-2803",
"year": 2020,
"county": "Tulsa",
"phone_num": 918-555-5555,
"add_phone_num": 918-111-1111
"phone_num": "000-000-0000",
"add_phone_num": "000-000-0001"
}
resp = self.client.post("https://courtbot-python.herokuapp.com/form_data", data=data, follow=True)
resp = self.client.post("https://courtbot-python.herokuapp.com/schedule_reminders", data=data, follow=True)

self.assertIn(str.encode("Reminder scheduled"), resp.content)
self.assertIn(str.encode("Text reminder for case CF-2020-2803 occuring on 2020-07-21T09:00:00 was scheduled under 000-000-0000."), resp.content)