mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
build: fix loading config files in tests
The new test case works with the default config.
This commit is contained in:
parent
1e4e2489aa
commit
43b278b9d6
@ -611,7 +611,7 @@ class BuildTest(unittest.TestCase):
|
|||||||
with open('config.yml', 'w') as fp:
|
with open('config.yml', 'w') as fp:
|
||||||
yaml.dump({'sdk_path': sdk_path, 'keep_when_not_allowed': True}, fp)
|
yaml.dump({'sdk_path': sdk_path, 'keep_when_not_allowed': True}, fp)
|
||||||
os.chmod('config.yml', 0o600)
|
os.chmod('config.yml', 0o600)
|
||||||
fdroidserver.common.build = fdroidserver.common.read_config()
|
fdroidserver.build.config = fdroidserver.common.read_config()
|
||||||
|
|
||||||
os.mkdir('metadata')
|
os.mkdir('metadata')
|
||||||
appid = 'info.guardianproject.checkey'
|
appid = 'info.guardianproject.checkey'
|
||||||
@ -703,13 +703,6 @@ class BuildTest(unittest.TestCase):
|
|||||||
|
|
||||||
def test_failed_allowedapksigningkeys_are_not_in_unsigned(self):
|
def test_failed_allowedapksigningkeys_are_not_in_unsigned(self):
|
||||||
os.chdir(self.testdir)
|
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')
|
os.mkdir('metadata')
|
||||||
appid = 'info.guardianproject.checkey'
|
appid = 'info.guardianproject.checkey'
|
||||||
metadata_file = os.path.join('metadata', appid + '.yml')
|
metadata_file = os.path.join('metadata', appid + '.yml')
|
||||||
|
Loading…
Reference in New Issue
Block a user