From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Context manager delete the created repository as cleanup,
But repository is update afterwards, the newly created one
does not exist any more. So update repository again to the original
one so that context manager can delete it successfully.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
tests/test_model.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/test_model.py b/tests/test_model.py
index 1355295..c42c8de 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -1655,16 +1655,17 @@ class ModelTests(unittest.TestCase):
self.assertEquals(system_host_repos + 1, len(host_repos))
# update repositories with invalid data
- for repo in invalid_repos:
+ for tmp_repo in invalid_repos:
self.assertRaises(InvalidParameter, inst.repository_update,
- repo_id, repo)
+ repo_id, tmp_repo)
new_repo_id = inst.repository_update(repo_id, new_repo)
repo_info = inst.repository_lookup(new_repo_id)
- self.assertEquals(new_repo_id, repo_info['repo_id'])
- self.assertEquals(new_repo['baseurl'], repo_info['baseurl'])
- self.assertEquals(True, repo_info['enabled'])
+ self.assertEquals(new_repo_id, repo_info['repo_id'])
+ self.assertEquals(new_repo['baseurl'], repo_info['baseurl'])
+ self.assertEquals(True, repo_info['enabled'])
+ inst.repository_update(new_repo_id, repo)
def test_repository_disable_enable(self):
inst = model.Model('test:///default',
--
1.8.3.2
Show replies by date
Applied. Thanks.
Regards,
Aline Manera