aboutsummaryrefslogtreecommitdiff
path: root/tests/component/deb/test_import_dsc.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-12-26 20:15:18 +0100
committerGuido Günther <agx@sigxcpu.org>2016-12-26 20:15:18 +0100
commit58271d630fef2b235f4b8971f96bbd166eccca59 (patch)
treec9a5385bb06a16a4e34b1590aedb7838b1253514 /tests/component/deb/test_import_dsc.py
parentd90e6be44fd6678830a0766b7e545cbb9c13ed1e (diff)
import-dsc: determine download automatically
No need to parse --download of URL is given or it's not a dsc file
Diffstat (limited to 'tests/component/deb/test_import_dsc.py')
-rw-r--r--tests/component/deb/test_import_dsc.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py
index 7496d0a..947c2ba 100644
--- a/tests/component/deb/test_import_dsc.py
+++ b/tests/component/deb/test_import_dsc.py
@@ -19,8 +19,9 @@
import os
from tests.component import (ComponentTestBase,
- ComponentTestGitRepository)
-from tests.component.deb import DEB_TEST_DATA_DIR
+ ComponentTestGitRepository,
+ skipUnless)
+from tests.component.deb import DEB_TEST_DATA_DIR, DEB_TEST_DOWNLOAD_URL
from nose.tools import ok_, eq_
@@ -56,6 +57,20 @@ class TestImportDsc(ComponentTestBase):
self._check_repo_state(repo, 'master', ['master'])
assert len(repo.get_commits()) == 3
+ @skipUnless(os.getenv("GBP_NETWORK_TESTS"), "network tests disabled")
+ def test_download(self):
+ def _dsc(version):
+ return os.path.join(DEB_TEST_DOWNLOAD_URL,
+ 'dsc-native',
+ 'git-buildpackage_%s.dsc' % version)
+ dsc = _dsc('0.4.14')
+ assert import_dsc(['arg0',
+ '--allow-unauthenticated',
+ dsc]) == 0
+ repo = ComponentTestGitRepository('git-buildpackage')
+ self._check_repo_state(repo, 'master', ['master'])
+ assert len(repo.get_commits()) == 1
+
def test_create_branches(self):
"""Test if creating missing branches works"""
def _dsc(version):