Skip to content

Commit

Permalink
Add missing test case for course dates
Browse files Browse the repository at this point in the history
Test invalid dates which produce a ValueError in the course service.
  • Loading branch information
marcospri committed Jan 8, 2025
1 parent 66f9311 commit 9f14e41
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/unit/lms/services/course_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,19 @@ def test_get_from_launch_when_new_and_historical_course_exists(

@pytest.mark.parametrize(
"custom_course_starts, course_starts_at",
[(None, None), ("2022-01-01T00:00:00Z", datetime(2022, 1, 1, tzinfo=UTC))],
[
(None, None),
("NOT A DATE", None),
("2022-01-01T00:00:00Z", datetime(2022, 1, 1, tzinfo=UTC)),
],
)
@pytest.mark.parametrize(
"custom_course_ends, course_ends_at",
[(None, None), ("2022-01-01T00:00:00Z", datetime(2022, 1, 1, tzinfo=UTC))],
[
(None, None),
("NOT A DATE", None),
("2022-01-01T00:00:00Z", datetime(2022, 1, 1, tzinfo=UTC)),
],
)
@pytest.mark.parametrize(
"custom_canvas_api_id",
Expand Down

0 comments on commit 9f14e41

Please sign in to comment.