summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2026-05-01 21:15:12 -0400
committerJacob Walls <jacobtylerwalls@gmail.com>2026-05-02 08:19:54 -0400
commit50bbf71bbd51616e2ce48785336ca3746fbe5f24 (patch)
tree5f1161b131d9bcb7abb43f43f870f0b291113c1f
parent5dfb6586f7be213d68d9f82510028660cfaed916 (diff)
Removed integer pk assumption from file_uploads test.
The test was incompatible with MongoDB's bson.ObjectId.
-rw-r--r--tests/file_uploads/tests.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py
index 6374b4cee6..a5c9c36ac5 100644
--- a/tests/file_uploads/tests.py
+++ b/tests/file_uploads/tests.py
@@ -800,8 +800,7 @@ class FileUploadTests(TestCase):
"multipart/form-data; boundary=%(boundary)s" % vars,
)
self.assertEqual(response.status_code, 200)
- id = int(response.content)
- obj = FileModel.objects.get(pk=id)
+ obj = FileModel.objects.get(pk=response.content.decode())
# The name of the file uploaded and the file stored in the server-side
# shouldn't differ.
self.assertEqual(os.path.basename(obj.testfile.path), "MiXeD_cAsE.txt")