summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_handler/test_handler_snappy.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/unittests/test_handler/test_handler_snappy.py b/tests/unittests/test_handler/test_handler_snappy.py
index 8effd99d..f3109bac 100644
--- a/tests/unittests/test_handler/test_handler_snappy.py
+++ b/tests/unittests/test_handler/test_handler_snappy.py
@@ -53,15 +53,17 @@ class TestInstallPackages(t_help.TestCase):
config = None
pkg = None
for arg in args[2:]:
- if arg.startswith("--config="):
- cfgfile = arg.partition("=")[2]
+ if arg.startswith("-"):
+ continue
+ if not pkg:
+ pkg = arg
+ elif not config:
+ cfgfile = arg
if cfgfile == "-":
config = kwargs.get('data', '')
elif cfgfile:
with open(cfgfile, "rb") as fp:
config = yaml.safe_load(fp.read())
- elif not pkg and not arg.startswith("-"):
- pkg = arg
self.snapcmds.append(['install', pkg, config])
def test_package_ops_1(self):