def test_update_no_updates(self): db_api.security_service_create(self.fake_context, security_service_dict) result = db_api.security_service_update(self.fake_context, security_service_dict['id'], {}) self._check_expected_fields(result, security_service_dict)
def test_update(self): update_dict = {'dns_ip': 'new dns', 'server': 'new ldap server', 'domain': 'new ldap domain', 'sid': 'new sid', 'password': '******', 'name': 'new whatever', 'description': 'new nevermind', 'status': constants.STATUS_ERROR} db_api.security_service_create(self.fake_context, security_service_dict) result = db_api.security_service_update(self.fake_context, security_service_dict['id'], update_dict) self._check_expected_fields(result, update_dict)