mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
use for f in files
var name; avoid using keyword as var name
This commit is contained in:
parent
1720a51e9e
commit
8b52740636
1 changed files with 17 additions and 17 deletions
|
@ -124,10 +124,10 @@ class IntegrationTest(unittest.TestCase):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for file in FILES.glob("*.apk"):
|
for f in FILES.glob("*.apk"):
|
||||||
if not to_skip(file.name):
|
if not to_skip(f.name):
|
||||||
shutil.copy(
|
shutil.copy(
|
||||||
file, Path("repo") / IntegrationTest.get_fdroid_apk_filename(file)
|
f, Path("repo") / IntegrationTest.get_fdroid_apk_filename(f)
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -312,15 +312,15 @@ class IntegrationTest(unittest.TestCase):
|
||||||
{"Summary": "good MD5 sig, which is disabled algorithm"},
|
{"Summary": "good MD5 sig, which is disabled algorithm"},
|
||||||
replace=True,
|
replace=True,
|
||||||
)
|
)
|
||||||
for file in Path("metadata").glob("*.yml"):
|
for f in Path("metadata").glob("*.yml"):
|
||||||
self.remove_lines(file, ["ArchivePolicy:"])
|
self.remove_lines(f, ["ArchivePolicy:"])
|
||||||
for file in itertools.chain(
|
for f in itertools.chain(
|
||||||
FILES.glob("urzip.apk"),
|
FILES.glob("urzip.apk"),
|
||||||
FILES.glob("org.bitbucket.tickytacky.mirrormirror_[0-9].apk"),
|
FILES.glob("org.bitbucket.tickytacky.mirrormirror_[0-9].apk"),
|
||||||
FILES.glob("repo/com.politedroid_[0-9].apk"),
|
FILES.glob("repo/com.politedroid_[0-9].apk"),
|
||||||
FILES.glob("repo/obb.main.twoversions_110161[357].apk"),
|
FILES.glob("repo/obb.main.twoversions_110161[357].apk"),
|
||||||
):
|
):
|
||||||
shutil.copy(file, "repo")
|
shutil.copy(f, "repo")
|
||||||
self.update_yaml("config.yml", {"archive_older": 3})
|
self.update_yaml("config.yml", {"archive_older": 3})
|
||||||
|
|
||||||
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
||||||
|
@ -341,8 +341,8 @@ class IntegrationTest(unittest.TestCase):
|
||||||
self.fdroid_init_with_prebuilt_keystore()
|
self.fdroid_init_with_prebuilt_keystore()
|
||||||
Path("metadata").mkdir()
|
Path("metadata").mkdir()
|
||||||
shutil.copy(FILES / "metadata/com.politedroid.yml", "metadata")
|
shutil.copy(FILES / "metadata/com.politedroid.yml", "metadata")
|
||||||
for file in FILES.glob("repo/com.politedroid_[0-9].apk"):
|
for f in FILES.glob("repo/com.politedroid_[0-9].apk"):
|
||||||
shutil.copy(file, "repo")
|
shutil.copy(f, "repo")
|
||||||
self.update_yaml("config.yml", {"archive_older": 3})
|
self.update_yaml("config.yml", {"archive_older": 3})
|
||||||
|
|
||||||
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
||||||
|
@ -441,8 +441,8 @@ class IntegrationTest(unittest.TestCase):
|
||||||
Path("metadata").mkdir()
|
Path("metadata").mkdir()
|
||||||
shutil.copy(FILES / "metadata/com.politedroid.yml", "metadata")
|
shutil.copy(FILES / "metadata/com.politedroid.yml", "metadata")
|
||||||
self.remove_lines("metadata/com.politedroid.yml", ["ArchivePolicy:"])
|
self.remove_lines("metadata/com.politedroid.yml", ["ArchivePolicy:"])
|
||||||
for file in FILES.glob("repo/com.politedroid_[0-9].apk"):
|
for f in FILES.glob("repo/com.politedroid_[0-9].apk"):
|
||||||
shutil.copy(file, "repo")
|
shutil.copy(f, "repo")
|
||||||
self.update_yaml("config.yml", {"archive_older": 3})
|
self.update_yaml("config.yml", {"archive_older": 3})
|
||||||
|
|
||||||
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
||||||
|
@ -556,14 +556,14 @@ class IntegrationTest(unittest.TestCase):
|
||||||
{"Summary": "good MD5 sig, disabled algorithm"},
|
{"Summary": "good MD5 sig, disabled algorithm"},
|
||||||
replace=True,
|
replace=True,
|
||||||
)
|
)
|
||||||
for file in Path("metadata").glob("*.yml"):
|
for f in Path("metadata").glob("*.yml"):
|
||||||
self.remove_lines(file, ["ArchivePolicy:"])
|
self.remove_lines(f, ["ArchivePolicy:"])
|
||||||
for file in itertools.chain(
|
for f in itertools.chain(
|
||||||
FILES.glob("urzip-badsig.apk"),
|
FILES.glob("urzip-badsig.apk"),
|
||||||
FILES.glob("org.bitbucket.tickytacky.mirrormirror_[0-9].apk"),
|
FILES.glob("org.bitbucket.tickytacky.mirrormirror_[0-9].apk"),
|
||||||
FILES.glob("repo/com.politedroid_[0-9].apk"),
|
FILES.glob("repo/com.politedroid_[0-9].apk"),
|
||||||
):
|
):
|
||||||
shutil.copy(file, "repo")
|
shutil.copy(f, "repo")
|
||||||
|
|
||||||
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
self.assert_run(self.fdroid_cmd + ["update", "--pretty", "--nosign"])
|
||||||
repo = Path("repo/index.xml").read_text()
|
repo = Path("repo/index.xml").read_text()
|
||||||
|
@ -1163,8 +1163,8 @@ class IntegrationTest(unittest.TestCase):
|
||||||
"config.yml",
|
"config.yml",
|
||||||
{"archive_older": 3, "servergitmirrors": str(server_git_mirror)},
|
{"archive_older": 3, "servergitmirrors": str(server_git_mirror)},
|
||||||
)
|
)
|
||||||
for file in FILES.glob("repo/com.politedroid_[345].apk"):
|
for f in FILES.glob("repo/com.politedroid_[345].apk"):
|
||||||
shutil.copy(file, "repo")
|
shutil.copy(f, "repo")
|
||||||
self.assert_run(self.fdroid_cmd + ["update", "--create-metadata"])
|
self.assert_run(self.fdroid_cmd + ["update", "--create-metadata"])
|
||||||
self.assert_run(self.fdroid_cmd + ["deploy"])
|
self.assert_run(self.fdroid_cmd + ["deploy"])
|
||||||
git_mirror = Path("git-mirror")
|
git_mirror = Path("git-mirror")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue