mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
run black on tests/updates.TestCase to fix lint failure
This commit is contained in:
parent
e799f32d71
commit
99e0c28d37
@ -102,28 +102,27 @@ class UpdateTest(unittest.TestCase):
|
|||||||
repo_dir = os.path.join(self.basedir, 'repo')
|
repo_dir = os.path.join(self.basedir, 'repo')
|
||||||
os.mkdir('metadata')
|
os.mkdir('metadata')
|
||||||
for packageName in (
|
for packageName in (
|
||||||
'obb.mainpatch.current',
|
'obb.mainpatch.current',
|
||||||
'org.videolan.vlc',
|
'org.videolan.vlc',
|
||||||
):
|
):
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
os.path.join(repo_dir, packageName),
|
os.path.join(repo_dir, packageName), os.path.join('repo', packageName)
|
||||||
os.path.join('repo', packageName)
|
|
||||||
)
|
)
|
||||||
for packageName in (
|
for packageName in (
|
||||||
'info.guardianproject.checkey',
|
'info.guardianproject.checkey',
|
||||||
'info.guardianproject.urzip',
|
'info.guardianproject.urzip',
|
||||||
'org.smssecure.smssecure',
|
'org.smssecure.smssecure',
|
||||||
):
|
):
|
||||||
if not os.path.exists('metadata'):
|
if not os.path.exists('metadata'):
|
||||||
os.mkdir('metadata')
|
os.mkdir('metadata')
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
os.path.join(self.basedir, 'metadata', packageName),
|
os.path.join(self.basedir, 'metadata', packageName),
|
||||||
os.path.join('metadata', packageName)
|
os.path.join('metadata', packageName),
|
||||||
)
|
)
|
||||||
for packageName in (
|
for packageName in (
|
||||||
'com.nextcloud.client',
|
'com.nextcloud.client',
|
||||||
'com.nextcloud.client.dev',
|
'com.nextcloud.client.dev',
|
||||||
'eu.siacs.conversations',
|
'eu.siacs.conversations',
|
||||||
):
|
):
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
os.path.join(self.basedir, 'source-files', packageName),
|
os.path.join(self.basedir, 'source-files', packageName),
|
||||||
@ -255,7 +254,6 @@ class UpdateTest(unittest.TestCase):
|
|||||||
fdroidserver.update.insert_localized_app_metadata(apps)
|
fdroidserver.update.insert_localized_app_metadata(apps)
|
||||||
self.assertEqual('42', apps[app.id]['localized']['en-US']['whatsNew'])
|
self.assertEqual('42', apps[app.id]['localized']['en-US']['whatsNew'])
|
||||||
|
|
||||||
|
|
||||||
def test_name_title_scraping(self):
|
def test_name_title_scraping(self):
|
||||||
"""metadata file --> fdroiddata localized files --> fastlane/triple-t in app source --> APK"""
|
"""metadata file --> fdroiddata localized files --> fastlane/triple-t in app source --> APK"""
|
||||||
config = dict()
|
config = dict()
|
||||||
@ -360,7 +358,7 @@ class UpdateTest(unittest.TestCase):
|
|||||||
appid = 'info.guardianproject.checkey'
|
appid = 'info.guardianproject.checkey'
|
||||||
testapps = {appid: copy.copy(apps[appid])}
|
testapps = {appid: copy.copy(apps[appid])}
|
||||||
self.assertEqual('Checkey the app!', testapps[appid]['Name'])
|
self.assertEqual('Checkey the app!', testapps[appid]['Name'])
|
||||||
del (testapps[appid]['Name'])
|
del testapps[appid]['Name']
|
||||||
fdroidserver.update.insert_missing_app_names_from_apks(testapps, apks)
|
fdroidserver.update.insert_missing_app_names_from_apks(testapps, apks)
|
||||||
self.assertIsNone(testapps[appid].get('Name'))
|
self.assertIsNone(testapps[appid].get('Name'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user