From 09e013ffed5c4d64b2c4bc04755c5b8921f554f4 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Mon, 27 Nov 2017 19:59:32 +0100 Subject: DebianSource: provide mapping for control file as well This makes sure we have the logic to access these files in debian/ in one place. Gbp-Dch: Ignore --- tests/15_test_DebianSource.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/15_test_DebianSource.py') diff --git a/tests/15_test_DebianSource.py b/tests/15_test_DebianSource.py index efc38b4f..06ffb78b 100644 --- a/tests/15_test_DebianSource.py +++ b/tests/15_test_DebianSource.py @@ -110,3 +110,11 @@ class TestDebianSource(testutils.DebianGitTestRepo): source = DebianSource('.') self.assertEquals(source.changelog.distribution, "UNRELEASED") self.assertFalse(source.is_releasable()) + + def test_control(self): + os.makedirs('debian/') + with open('debian/control', 'w') as f: + f.write("Source: foo") + source = DebianSource('.') + self.assertIsNotNone(source.control) + self.assertEquals(source.control.name, "foo") -- cgit v1.2.3