Add system's requirements.txt, enforce flake8 linter

Fix style issues in functional tests.
This commit is contained in:
Andrey Smirnov
2017-04-27 18:58:15 +03:00
parent 7a7b981d4f
commit c798db8056
44 changed files with 334 additions and 260 deletions
+10 -6
View File
@@ -1,12 +1,16 @@
from lib import BaseTest
def sortLines(_, s):
return "\n".join(sorted(s.split("\n")))
class ShowPackage1Test(BaseTest):
"""
show package: regular show
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show 'Name (% nginx-extras*)'"
@@ -22,7 +26,7 @@ class ShowPackage3Test(BaseTest):
show package: by key
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -31,7 +35,7 @@ class ShowPackage4Test(BaseTest):
show package: with files
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
gold_processor = BaseTest.expand_environ
runCmd = "aptly package show -with-files nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -41,7 +45,7 @@ class ShowPackage5Test(BaseTest):
show package: with inclusion
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show -with-references nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -58,7 +62,7 @@ class ShowPackage6Test(BaseTest):
"aptly repo create repo1",
"aptly repo import wheezy-main repo1 nginx",
]
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show -with-references nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -72,5 +76,5 @@ class ShowPackage7Test(BaseTest):
"aptly repo add a ${files}",
"aptly repo add b ${testfiles}"
]
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show -with-references \"pyspi (0.6.1-1.3)\""