diff --git a/inventree/base.py b/inventree/base.py index c0cf2c5..c99519b 100644 --- a/inventree/base.py +++ b/inventree/base.py @@ -441,8 +441,6 @@ def upload(cls, api, attachment, comment='', **kwargs): data = kwargs data['comment'] = comment - print("Attachment.upload:", cls, api, attachment, comment, kwargs) - if type(attachment) is str: if not os.path.exists(attachment): raise FileNotFoundError(f"Attachment file '{attachment}' does not exist") @@ -461,8 +459,6 @@ def upload(cls, api, attachment, comment='', **kwargs): # Assumes a StringIO or BytesIO like object name = getattr(attachment, 'name', 'filename') - print("Uploading:", Attachment.URL, data) - response = api.post( Attachment.URL, data, diff --git a/test/test_part.py b/test/test_part.py index e5db1a6..954cbe9 100644 --- a/test/test_part.py +++ b/test/test_part.py @@ -468,7 +468,7 @@ def test_part_attachment(self): # Test that attempting to upload an invalid file fails with self.assertRaises(FileNotFoundError): - prt.uploadAttachment(self.api, 'test-file.txt') + prt.uploadAttachment('test-file.txt') # Check that no new files have been uploaded self.assertEqual(len(prt.getAttachments()), n)