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

Commit

Permalink
test(tasks/tests): fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HladczukLe committed Dec 5, 2023
1 parent 4580ec0 commit 5b10cbd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/tasks/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,13 @@ def test_send_submission_successfully(self) -> None:
def test_send_submission_with_short_code(self) -> None:
self.client.force_login(self.user)

initial_submission_count = Submission._default_manager.count()

self.client.post(self.url, data={"code": "c"})
self.assertEqual(Submission._default_manager.count(), 1)

final_submission_count = Submission._default_manager.count()

self.assertEqual(final_submission_count, initial_submission_count + 1)

def test_detail_view_model_is_task(self) -> None:
self.assertEqual(DetailView.model, Task)
Expand Down

0 comments on commit 5b10cbd

Please sign in to comment.