Commits

Ron DuPlain committed 0ebfb5b

Add test for issue #7.

  • Participants
  • Parent commits 7c5814c

Comments (0)

Files changed (1)

File tests/test-uploads.py

         res = uset.save(tfs)
         assert res == 'foo_6.txt'
 
+    def test_conflict_without_extension(self):
+        # Test case for issue #7.
+        uset = UploadSet('files', extensions=(''))
+        uset._config = Config('/uploads')
+        tfs = TestingFileStorage(filename='foo')
+        self.extant('/uploads/foo')
+        res = uset.save(tfs)
+        assert res == 'foo_1'
+
 
 class TestPathsAndURLs(object):
     def test_path(self):