Only raise FileLength validation error on files

This commit is contained in:
dandds
2019-06-10 19:26:44 -04:00
parent 62c794e7b8
commit 49332c5d6e
2 changed files with 8 additions and 2 deletions

View File

@@ -100,3 +100,6 @@ class TestFileLength:
with pytest.raises(ValidationError):
validator(dummy_form, dummy_field)
dummy_field.data = "random string"
assert validator(dummy_form, dummy_field)