Skip to content

Commit

Permalink
test: verifing test cases 21
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarhan943 committed Sep 23, 2024
1 parent f5db22e commit 241f820
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
- "lms-6"
- "openedx-1-with-lms"
- "openedx-2-with-lms"
- "openedx-1-with-cms"
- "openedx-2-with-cms"
# - "openedx-1-with-cms"
# - "openedx-2-with-cms"
- "cms-1"
- "cms-2"
- "common-with-lms"
- "common-with-cms"
# - "common-with-cms"
- "xmodule-with-lms"
- "xmodule-with-cms"
# - "xmodule-with-cms"
mongo-version:
- "7.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def _run_command_and_check_output(self, task_mock, score_db_table, include_anony
"course_id": 'course-v1:x+y+z',
"usage_id": 'abc',
"only_if_higher": False,
"expected_modified_time": to_timestamp(datetime.strptime('2016-08-23 16:43', DATE_FORMAT).replace(tzinfo=ZoneInfo("UTC"))),
"expected_modified_time": to_timestamp(
datetime.strptime('2016-08-23 16:43', DATE_FORMAT).replace(
tzinfo=ZoneInfo("UTC")
)
),
"score_deleted": False,
"event_transaction_id": str(get_event_transaction_id()),
"event_transaction_type": 'edx.grades.problem.submitted',
Expand Down
6 changes: 5 additions & 1 deletion lms/djangoapps/grades/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def mock_get_score(earned=0, possible=1, first_attempted=datetime(2000, 1, 1, 0,


@contextmanager
def mock_get_submissions_score(earned=0, possible=1, first_attempted=datetime(2000, 1, 1, 0, 0, 0, tzinfo=ZoneInfo("UTC"))):
def mock_get_submissions_score(
earned=0,
possible=1,
first_attempted=datetime(2000, 1, 1, 0, 0, 0, tzinfo=ZoneInfo("UTC")),
):
"""
Mocks the _get_submissions_score function to return the specified values
"""
Expand Down

0 comments on commit 241f820

Please sign in to comment.