Skip to content

Commit

Permalink
add test to make sure FileStorage has a name
Browse files Browse the repository at this point in the history
  • Loading branch information
jugmac00 committed Jan 18, 2021
1 parent 3dcc7a4 commit 7230f90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_flask_reuploaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ def teardown(self):
os.makedirs = self.old_makedirs
del self.old_makedirs

def test_filestorage_requires_name(self):
uset = UploadSet('files')
# no name passed in here
tfs = TestingFileStorage()
with pytest.raises(ValueError):
uset.save(tfs)

def test_saved(self):
uset = UploadSet('files')
uset._config = Config('/uploads')
Expand Down

0 comments on commit 7230f90

Please sign in to comment.