diff options
author | Rémi Duraffort <remi.duraffort@linaro.org> | 2018-06-26 13:47:10 +0200 |
---|---|---|
committer | Rémi Duraffort <remi.duraffort@linaro.org> | 2018-07-11 10:08:11 +0200 |
commit | e9367c747f5d9271b274a6dc18b538e722953d3b (patch) | |
tree | 6b2bd22a72975e9e5297d96d6cbb94659b08d311 /lava_dispatcher/test/test_lxc.py | |
parent | 210140b0f248721cc57ffb223487df88ecd9ce20 (diff) |
By default, dict.get() default value is None
Change-Id: I9d61efc457fb5e49ac1b3ad56acaa1b453b9cc4a
Diffstat (limited to 'lava_dispatcher/test/test_lxc.py')
-rw-r--r-- | lava_dispatcher/test/test_lxc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lava_dispatcher/test/test_lxc.py b/lava_dispatcher/test/test_lxc.py index 05dc3c03d..fba6e1230 100644 --- a/lava_dispatcher/test/test_lxc.py +++ b/lava_dispatcher/test/test_lxc.py @@ -157,7 +157,7 @@ class TestLxcWithDevices(StdoutTestCase): prepare = [action for action in tftp_deploy.internal_pipeline.actions if action.name == 'prepare-tftp-overlay'][0] overlay = [action for action in prepare.internal_pipeline.actions if action.name == 'lava-overlay'][0] test_def = [action for action in overlay.internal_pipeline.actions if action.name == 'test-definition'][0] - namespace = test_def.parameters.get('namespace', None) + namespace = test_def.parameters.get('namespace') self.assertIsNotNone(namespace) test_actions = [action for action in self.job.parameters['actions'] if 'test' in action] for action in test_actions: @@ -221,12 +221,12 @@ class TestLxcWithDevices(StdoutTestCase): lxc_deploy = [action for action in job.pipeline.actions if action.name == 'lxc-deploy'][0] names = [action.name for action in lxc_deploy.internal_pipeline.actions] self.assertNotIn('prepare-tftp-overlay', names) - namespace1 = lxc_deploy.parameters.get('namespace', None) + namespace1 = lxc_deploy.parameters.get('namespace') tftp_deploy = [action for action in job.pipeline.actions if action.name == 'tftp-deploy'][0] prepare = [action for action in tftp_deploy.internal_pipeline.actions if action.name == 'prepare-tftp-overlay'][0] overlay = [action for action in prepare.internal_pipeline.actions if action.name == 'lava-overlay'][0] test_def = [action for action in overlay.internal_pipeline.actions if action.name == 'test-definition'][0] - namespace = test_def.parameters.get('namespace', None) + namespace = test_def.parameters.get('namespace') self.assertIsNotNone(namespace) self.assertIsNotNone(namespace1) self.assertNotEqual(namespace, namespace1) |