From a7c1fca7ef39547d78ca0ee0fba9852b7341e2f0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 15 Jul 2015 08:26:19 +0200 Subject: [PATCH] Robustify test configuration changes Stop assuming whether an option is commented or not in the default britney.conf file for the tests. --- tests/test_autopkgtest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index 202e909..ba0bb43 100644 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -37,11 +37,11 @@ class TestAutoPkgTest(TestBase): # Disable boottests and set fake AMQP and Swift server for line in fileinput.input(self.britney_conf, inplace=True): - if line.startswith('BOOTTEST_ENABLE'): + if 'BOOTTEST_ENABLE' in line: print('BOOTTEST_ENABLE = no') - elif line.startswith('#ADT_AMQP'): + elif 'ADT_AMQP' in line: print('ADT_AMQP = file://%s' % self.fake_amqp) - elif line.startswith('#ADT_SWIFT_URL'): + elif 'ADT_SWIFT_URL' in line: print('ADT_SWIFT_URL = http://localhost:18085') else: sys.stdout.write(line)