[Kimchi-devel] [PATCH 2/2] Fix testcases for repository config param

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Wed Sep 17 10:35:03 UTC 2014


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

Update according testcases which pass unexpected params to apt

Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
 tests/test_model.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/test_model.py b/tests/test_model.py
index ceedc6f..0a709a7 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -1318,10 +1318,11 @@ class ModelTests(unittest.TestCase):
             self.assertRaises(InvalidParameter, inst.repositories_create, repo)
 
         # create repositories with invalid mirrorlist
-        for url in invalid_urls:
-            repo = {'repo_id': 'repo_fake',
-                    'config': {'mirrorlist': url, 'dist': 'quantal'}}
-            self.assertRaises(InvalidParameter, inst.repositories_create, repo)
+        if repo_type == 'yum':
+            for url in invalid_urls:
+                repo = {'repo_id': 'repo_fake',
+                        'config': {'mirrorlist': url, 'dist': 'quantal'}}
+                self.assertRaises(InvalidParameter, inst.repositories_create, repo)
 
         for repo in test_repos:
             system_host_repos = len(inst.repositories_get_list())
-- 
1.8.3.2




More information about the Kimchi-devel mailing list