示例#1
0
 def test_set_immutable_property_now_not_in_cert(self):
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     existing_repo.update(incoming_repo)
     # Immutable properties should be always be added/updated,
     # and removed if undefined in the new repo definition.
     self.assertFalse("proxy_username" in existing_repo.keys())
 def test_set_immutable_property_now_empty(self):
     self._inject_mock_invalid_consumer()
     update_action = RepoUpdateActionCommand()
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     update_action.update_repo(existing_repo, incoming_repo)
     self.assertFalse("proxy_username" in list(existing_repo.keys()))
示例#3
0
 def test_set_immutable_property_now_empty(self):
     self._inject_mock_invalid_consumer()
     update_action = RepoUpdateActionCommand()
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     update_action.update_repo(existing_repo, incoming_repo)
     self.assertFalse("proxy_username" in existing_repo.keys())
示例#4
0
 def test_set_mutable_property_now_empty_value(self):
     existing_repo = Repo('testrepo')
     existing_repo['metadata_expire'] = "blah"
     incoming_repo = {'metadata_expire': ''}
     existing_repo.update(incoming_repo)
     # re comments in repolib
     # Mutable properties should be added if not currently defined,
     # otherwise left alone.
     self.assertTrue("metadata_expire" in existing_repo.keys())
 def test_set_immutable_property_now_not_in_cert(self):
     self._inject_mock_invalid_consumer()
     update_action = RepoUpdateActionCommand()
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     update_action.update_repo(existing_repo, incoming_repo)
     # Immutable properties should be always be added/updated,
     # and removed if undefined in the new repo definition.
     self.assertFalse("proxy_username" in list(existing_repo.keys()))
示例#6
0
 def test_set_immutable_property_now_not_in_cert(self):
     self._inject_mock_invalid_consumer()
     update_action = RepoUpdateActionCommand()
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     update_action.update_repo(existing_repo, incoming_repo)
     # Immutable properties should be always be added/updated,
     # and removed if undefined in the new repo definition.
     self.assertFalse("proxy_username" in existing_repo.keys())
 def test_set_mutable_property_now_not_in_cert(self):
     self._inject_mock_invalid_consumer()
     update_action = RepoUpdateActionCommand()
     existing_repo = Repo('testrepo')
     existing_repo['metadata_expire'] = "blah"
     incoming_repo = {}
     update_action.update_repo(existing_repo, incoming_repo)
     # re comments in repolib
     # Mutable properties should be added if not currently defined,
     # otherwise left alone.
     self.assertTrue("metadata_expire" in list(existing_repo.keys()))
示例#8
0
 def test_set_mutable_property_now_not_in_cert(self):
     self._inject_mock_invalid_consumer()
     update_action = RepoUpdateActionCommand()
     existing_repo = Repo('testrepo')
     existing_repo['metadata_expire'] = "blah"
     incoming_repo = {}
     update_action.update_repo(existing_repo, incoming_repo)
     # re comments in repolib
     # Mutable properties should be added if not currently defined,
     # otherwise left alone.
     self.assertTrue("metadata_expire" in existing_repo.keys())
示例#9
0
 def test_set_immutable_property_now_empty(self):
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     existing_repo.update(incoming_repo)
     self.assertFalse("proxy_username" in existing_repo.keys())
示例#10
0
 def test_set_immutable_property_now_empty(self):
     existing_repo = Repo('testrepo')
     existing_repo['proxy_username'] = "******"
     incoming_repo = {}
     existing_repo.update(incoming_repo)
     self.assertFalse("proxy_username" in existing_repo.keys())