summaryrefslogtreecommitdiff
path: root/tests/file_storage/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/file_storage/tests.py')
-rw-r--r--tests/file_storage/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py
index 892d4129a5..6edfd2902c 100644
--- a/tests/file_storage/tests.py
+++ b/tests/file_storage/tests.py
@@ -792,6 +792,12 @@ class FileFieldStorageTests(TestCase):
self.assertEqual(obj.empty.read(), b"more content")
obj.empty.close()
+ def test_pathlib_upload_to(self):
+ obj = Storage()
+ obj.pathlib_callable.save('some_file1.txt', ContentFile('some content'))
+ self.assertEqual(obj.pathlib_callable.name, 'bar/some_file1.txt')
+ obj.random.close()
+
def test_random_upload_to(self):
# Verify the fix for #5655, making sure the directory is only
# determined once.