Skip to content

Commit

Permalink
Change dates in test_data.json and teacher_list_test.py files
Browse files Browse the repository at this point in the history
Selenium tests are failing because the dates in the test have passed. The course is supposed to be open in order to run the tests successfully so future dates need to be set in test data JSON and teacher_list_test.py files
  • Loading branch information
ashi006 committed Oct 17, 2023
1 parent 46a5007 commit a299b1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions selenium_test/test/teacher_list_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ def testTableHasCorrectData(self) -> None:
'',
'aplus-001 My test course: A+ Test Course Instance',
'2020-09-27 09:00:00+00:00',
'2023-09-27 09:00:00+00:00'
'2030-09-27 09:00:00+00:00'
],
[
'Teacher User',
'',
'aplus-001 My test course: Hook Example',
'2020-09-27 09:00:00+00:00',
'2023-09-27 09:00:00+00:00'
'2030-09-27 09:00:00+00:00'
],
]
list_data_with_assistants = [
Expand All @@ -82,25 +82,25 @@ def testTableHasCorrectData(self) -> None:
'',
'aplus-001 My test course: A+ Test Course Instance',
'2020-09-27 09:00:00+00:00',
'2023-09-27 09:00:00+00:00'
'2030-09-27 09:00:00+00:00'
],
[
'Assistant User',
'',
'aplus-001 My test course: A+ Test Course Instance',
'2020-09-27 09:00:00+00:00',
'2023-09-27 09:00:00+00:00'
'2030-09-27 09:00:00+00:00'
],
[
'Teacher User',
'',
'aplus-001 My test course: Hook Example',
'2020-09-27 09:00:00+00:00',
'2023-09-27 09:00:00+00:00'
'2030-09-27 09:00:00+00:00'
],
]

ending_time = date.fromisoformat("2023-09-27")
ending_time = date.fromisoformat("2030-09-27")
starting_time = date.fromisoformat("2020-09-27")

early = starting_time - timedelta(days=1)
Expand Down
8 changes: 4 additions & 4 deletions selenium_test/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
{
"fields": {
"head_urls": "",
"ending_time": "2023-09-27T09:00:00Z",
"ending_time": "2030-09-27T09:00:00Z",
"visible_to_students": true,
"configure_url": "",
"description": "",
Expand All @@ -77,7 +77,7 @@
{
"fields": {
"head_urls": "",
"ending_time": "2023-09-27T09:00:00Z",
"ending_time": "2030-09-27T09:00:00Z",
"visible_to_students": true,
"configure_url": "",
"description": "",
Expand Down Expand Up @@ -108,7 +108,7 @@
"name": "First Exercise Round",
"course_instance": 1,
"late_submissions_allowed": false,
"closing_time": "2023-09-27T09:00:00Z",
"closing_time": "2030-09-27T09:00:00Z",
"late_submission_deadline": "2024-09-27T09:00:00Z",
"introduction": "",
"opening_time": "2020-09-27T09:00:00Z",
Expand All @@ -126,7 +126,7 @@
"name": "Exercises with Hook",
"course_instance": 2,
"late_submissions_allowed": false,
"closing_time": "2023-09-27T09:00:00Z",
"closing_time": "2030-09-27T09:00:00Z",
"late_submission_deadline": "2024-09-27T09:00:00Z",
"introduction": "",
"opening_time": "2020-09-27T09:00:00Z",
Expand Down

0 comments on commit a299b1c

Please sign in to comment.