From 43b278b9d68fe8ffd51ea31a74b060255f9d36e6 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 5 May 2023 09:46:38 +0200 Subject: [PATCH] build: fix loading config files in tests The new test case works with the default config. --- tests/build.TestCase | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/build.TestCase b/tests/build.TestCase index c6cc0570..128b3f4c 100755 --- a/tests/build.TestCase +++ b/tests/build.TestCase @@ -611,7 +611,7 @@ class BuildTest(unittest.TestCase): with open('config.yml', 'w') as fp: yaml.dump({'sdk_path': sdk_path, 'keep_when_not_allowed': True}, fp) os.chmod('config.yml', 0o600) - fdroidserver.common.build = fdroidserver.common.read_config() + fdroidserver.build.config = fdroidserver.common.read_config() os.mkdir('metadata') appid = 'info.guardianproject.checkey' @@ -703,13 +703,6 @@ class BuildTest(unittest.TestCase): def test_failed_allowedapksigningkeys_are_not_in_unsigned(self): os.chdir(self.testdir) - sdk_path = os.path.join(self.testdir, 'android-sdk') - self.create_fake_android_home(sdk_path) - with open('config.yml', 'w') as fp: - yaml.dump({'sdk_path': sdk_path}, fp) - os.chmod('config.yml', 0o600) - fdroidserver.common.build = fdroidserver.common.read_config() - os.mkdir('metadata') appid = 'info.guardianproject.checkey' metadata_file = os.path.join('metadata', appid + '.yml')