diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-01-12 15:43:32 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-05-01 22:27:15 +0200 |
commit | 3308868a275d3ba96e411dab469367f14c767683 (patch) | |
tree | 36b41acefb169d810df60d21c51567dd3740dc96 /tests/05_test_detection.py | |
parent | 727cd7ba592364220ee71039f381406e6717220a (diff) |
Refactor deb helpers: introduce PkgPolicy class
Create a new 'pkg' basemodule, intended to be re-used by the upcoming
rpm package helpers. Move some deb functionality to a new pkg.PkgPolicy
class, to be used as a base for different package types. Introduces
Deb-specific deb.DebianPkgPolicy.
Diffstat (limited to 'tests/05_test_detection.py')
-rw-r--r-- | tests/05_test_detection.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/05_test_detection.py b/tests/05_test_detection.py index 913a7b9d..9abb6fe1 100644 --- a/tests/05_test_detection.py +++ b/tests/05_test_detection.py @@ -8,7 +8,7 @@ import tempfile import unittest from gbp.scripts import buildpackage -from gbp.deb import (has_orig, orig_file) +from gbp.deb import (DebianPkgPolicy, orig_file) from gbp.errors import GbpError class MockGitRepository: @@ -69,11 +69,11 @@ class TestDetection(unittest.TestCase): self.assertEqual("bzip2", guessed) def test_has_orig_false(self): - self.assertFalse(has_orig(orig_file(self.cp, 'gzip'), self.tmpdir)) + self.assertFalse(DebianPkgPolicy.has_orig(orig_file(self.cp, 'gzip'), self.tmpdir)) def test_has_orig_true(self): open(os.path.join(self.tmpdir, 'source_1.2.orig.tar.gz'), "w").close() - self.assertTrue(has_orig(orig_file(self.cp, 'gzip'), self.tmpdir)) + self.assertTrue(DebianPkgPolicy.has_orig(orig_file(self.cp, 'gzip'), self.tmpdir)) def test_guess_comp_type_bzip2(self): repo = MockGitRepository(with_branch=False) |