Skip to content

Commit

Permalink
test: test missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-richards committed Jul 20, 2024
1 parent 0555eef commit c7f6bde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ietf/meeting/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6246,6 +6246,12 @@ def test_upload_minutes_agenda(self):
q = PyQuery(r.content)
self.assertTrue(q('form input[type="checkbox"]'))

# test not submitting a file
r = self.client.post(url, dict(submission_method="upload"))
self.assertEqual(r.status_code, 200)
q = PyQuery(r.content)
self.assertTrue(q("form .is-invalid"))

test_file = BytesIO(b'this is some text for a test')
test_file.name = "not_really.json"
r = self.client.post(url,dict(submission_method="upload",file=test_file))
Expand Down

0 comments on commit c7f6bde

Please sign in to comment.