Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
refactor(apps/tasks): tests names now dont have upper case on them
Browse files Browse the repository at this point in the history
  • Loading branch information
thegm445 committed Dec 2, 2023
1 parent 25d1bd1 commit 42322db
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/tasks/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def test_handle_submission_with_wrong_output(self) -> None:
fetch_redirect_response=True,
)

def test_submission_with_AC_status_increases_user_score(self) -> None:
def test_submission_has_accepted_status_increases_user_score(self) -> None:
handle_submission(
self.submission.code, self.task.id, self.submission.id
)
Expand All @@ -334,7 +334,7 @@ def test_submission_with_AC_status_increases_user_score(self) -> None:
self.assertEqual(self.submission.status, SubmissionStatus.ACCEPTED)
self.assertEqual(self.user.score, self.task.score)

def test_submission_with_non_AC_status_does_not_increase_user_score(
def test_submission_without_accepted_status_does_not_increase_user_score(
self,
) -> None:
self.submission.code = 'print("Hello, Word")'
Expand All @@ -347,7 +347,7 @@ def test_submission_with_non_AC_status_does_not_increase_user_score(

self.assertEqual(self.user.score, 0)

def test_second_AC_submission_does_not_increase_user_score(self) -> None:
def test_repeated_accepted_submission_cant_sum_to_user_score(self) -> None:
handle_submission.apply(
args=(self.submission.code, self.task.id, self.submission.id)
)
Expand All @@ -364,7 +364,6 @@ def test_second_AC_submission_does_not_increase_user_score(self) -> None:
)

self.user.refresh_from_db()

self.assertEqual(self.user.score, self.task.score)

def test_form_success_url(self) -> None:
Expand Down

0 comments on commit 42322db

Please sign in to comment.