Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop committed Dec 21, 2024
1 parent 932b8c4 commit 988f523
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/apiv2/dfiq.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ def test_standalone_question_creation(self):
self.assertEqual(data["parent_ids"], [])

def test_upload_dfiq_archive(self):
zip_archive = open("tests/dfiq_test_data/dfiq_test_data.zip", "rb")
response = client.post(
"/api/v2/dfiq/from_archive",
files={"archive": ("test_archive.zip", zip_archive, "application/zip")},
)
with open("tests/dfiq_test_data/dfiq_test_data.zip", "rb") as zip_archive:
response = client.post(
"/api/v2/dfiq/from_archive",
files={"archive": ("test_archive.zip", zip_archive, "application/zip")},
)
data = response.json()
self.assertEqual(response.status_code, 200, data)
self.assertEqual(data, {"total_added": 3})
Expand Down

0 comments on commit 988f523

Please sign in to comment.