diff options
-rw-r--r-- | tests/14_test_gbp_import_dscs.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/14_test_gbp_import_dscs.py b/tests/14_test_gbp_import_dscs.py index 35b2e384..e86eabc3 100644 --- a/tests/14_test_gbp_import_dscs.py +++ b/tests/14_test_gbp_import_dscs.py @@ -56,11 +56,6 @@ class DscStub(object): return cls(filename, version) -# hook up stubs -import_dscs.GitImportDsc = StubGitImportDsc -import_dscs.DscFile = DscStub - - class TestImportDscs(testutils.DebianGitTestRepo): """Test L{gbp.scripts.import_dscs}'s """ @@ -70,6 +65,11 @@ class TestImportDscs(testutils.DebianGitTestRepo): self.orig_err = gbp.log.err gbp.log.err = self._check_err_msg + self.safed_GitImportDsc = import_dscs.GitImportDsc + self.safed_DscFile = import_dscs.DscFile + import_dscs.GitImportDsc = StubGitImportDsc + import_dscs.DscFile = DscStub + def _check_err_msg(self, err): self.assertIsInstance(err, GbpError) self.assertIn("Failed to import", err.message) @@ -97,3 +97,6 @@ class TestImportDscs(testutils.DebianGitTestRepo): gbp.log.err = self.orig_err testutils.DebianGitTestRepo.tearDown(self) context.teardown() + + import_dscs.GitImportDsc = self.safed_GitImportDsc + import_dscs.DscFile = self.safed_DscFile |