Commit 182e842a authored by Florian Pritz's avatar Florian Pritz
Browse files

test: Add upload status codes


Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 439ac0da
......@@ -11,7 +11,12 @@ class TestUploader(unittest.TestCase):
def test_upload_pkg(self):
mock_uploader = MagicMock()
app = upload_pkg_internetarchive.ArchiveUploader(mock_uploader, DB.DB(':memory:'))
app = upload_pkg_internetarchive.ArchiveUploader(mock_uploader,
DB.DB(':memory:'))
response_ok = MagicMock(status_code=200)
mock_uploader.configure_mock(**{'upload.side_effect': [[response_ok, response_ok, response_ok, response_ok]]})
self.assertFalse(app.db.exists('fb-client-2.0.4-1-any.pkg.tar.xz'))
self.assertFalse(app.db.exists('fb-client-2.0.3-2-any.pkg.tar.xz'))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment