Don't return filename from upload
The uploader only needs to return the object_name of the uploaded object. The filename is read directly from the input, so there's no need to return it as well.
This commit is contained in:
@@ -9,6 +9,7 @@ from tests.mocks import PDF_FILENAME
|
||||
def test_attach(pdf_upload):
|
||||
attachment = Attachment.attach(pdf_upload)
|
||||
assert attachment.filename == PDF_FILENAME
|
||||
assert attachment.object_name is not None
|
||||
|
||||
|
||||
def test_attach_raises():
|
||||
|
Reference in New Issue
Block a user