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

Commit

Permalink
test(apps/tasks): fix minimum characters code test
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterteriyaki committed Dec 6, 2023
1 parent 2caa274 commit c798162
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions apps/submissions/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

class SubmissionForm(Form):
code = CodeMirrorField(
min_length=15,
label="Code",
required=True,
config_name="python",
Expand Down
7 changes: 1 addition & 6 deletions apps/tasks/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,8 @@ 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"})

final_submission_count = Submission._default_manager.count()

self.assertEqual(final_submission_count, initial_submission_count + 1)
self.assertEqual(Submission._default_manager.count(), 1)

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

0 comments on commit c798162

Please sign in to comment.