Commit 20acb4c2 authored by Florian Pritz's avatar Florian Pritz
Browse files

Add basic uploader test


Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent be24adb2
../../../repos/2018/11/10/pool/community/fb-client-2.0.3-2-any.pkg.tar.xz
\ No newline at end of file
../../../repos/2018/11/10/pool/community/fb-client-2.0.3-2-any.pkg.tar.xz.sig
\ No newline at end of file
../../../repos/2018/11/10/pool/community/fb-client-2.0.3-2-any.pkg.tar.xz
\ No newline at end of file
../../../repos/2018/11/10/pool/community/fb-client-2.0.3-2-any.pkg.tar.xz.sig
\ No newline at end of file
+ repos/
+ repos/2018/
+ repos/2018/11/
+ repos/2018/11/10/
+ repos/2018/11/10/pool/
+ repos/2018/11/10/pool/community/
+ repos/2018/11/10/pool/community/fb-client-*
+ packages/
+ packages/f/
+ packages/f/fb-client/
+ packages/f/fb-client/*
- *
#!/usr/bin/env python
import upload_pkg_internetarchive
import mock
from unittest.mock import MagicMock
import unittest
class TestUploader(unittest.TestCase):
def test_upload_pkg(self):
mock_uploader = MagicMock()
app = upload_pkg_internetarchive.ArchiveUploader(mock_uploader)
app.main('./test-data/archive/packages/f/fb-client', ['2018'])
mock_uploader.upload.assert_called()
if __name__ == '__main__':
unittest.main()
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