diff options
author | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
---|---|---|
committer | Yaron Yogev <yaronyogev@gmail.com> | 2017-10-03 09:46:58 +0000 |
commit | d0adff06bed72f9a0edd7adccfa6a1111784bc8b (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /app/test/api/responders_test/resource/test_environment_configs.py | |
parent | fbbaf20912c79bd99a5c3696850d70c11965f56b (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit d32f75145676bacefde0d08a14680a5984623451)
Diffstat (limited to 'app/test/api/responders_test/resource/test_environment_configs.py')
-rw-r--r-- | app/test/api/responders_test/resource/test_environment_configs.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/app/test/api/responders_test/resource/test_environment_configs.py b/app/test/api/responders_test/resource/test_environment_configs.py index 7002ed7..6356f06 100644 --- a/app/test/api/responders_test/resource/test_environment_configs.py +++ b/app/test/api/responders_test/resource/test_environment_configs.py @@ -72,12 +72,21 @@ class TestEnvironmentConfigs(TestBase): }, expected_code=base.BAD_REQUEST_CODE) + def test_get_environment_configs_list_with_wrong_distribution_version(self): + self.validate_get_request(environment_configs.URL, + params={ + "distribution_version": + environment_configs.WRONG_DIST_VER + }, + expected_code=base.BAD_REQUEST_CODE) + @patch(base.RESPONDER_BASE_READ) def test_get_environment_configs_list_with_distribution(self, read): self.validate_get_request(environment_configs.URL, params={ "distribution": - environment_configs.CORRECT_DISTRIBUTION + environment_configs. + CORRECT_DISTRIBUTION }, mocks={ read: environment_configs. @@ -377,11 +386,12 @@ class TestEnvironmentConfigs(TestBase): def mock_validate_env_config_with_supported_envs(self, scanning, monitoring, listening): - InventoryMgr.is_feature_supported_in_env = lambda self, matches, feature: { - EnvironmentFeatures.SCANNING: scanning, - EnvironmentFeatures.MONITORING: monitoring, - EnvironmentFeatures.LISTENING: listening - }[feature] + InventoryMgr.is_feature_supported_in_env = \ + lambda self, matches, feature: { + EnvironmentFeatures.SCANNING: scanning, + EnvironmentFeatures.MONITORING: monitoring, + EnvironmentFeatures.LISTENING: listening + }[feature] @patch(base.RESPONDER_BASE_WRITE) def test_post_environment_config(self, write): |