def test_default_security_group_rest_callback(self):
try:
kwargs = test_sg_create
with mock.patch.object(self.securityGroupDb,
'get_security_group',
return_value=security_group):
resp = self._mock_req_resp(requests.codes.all_good)
with mock.patch('requests.request', return_value=resp):
self.secGroupSub.\
create_security_group(None, None, None, **kwargs)
resp = self._mock_req_resp(requests.codes.no_content)
with mock.patch('requests.request', return_value=resp):
self.secGroupSub.\
create_security_group(None, None, None, **kwargs)
resp = self._mock_req_resp(requests.codes.not_implemented)
with mock.patch('requests.request', return_value=resp):
self.secGroupSub.\
create_security_group(None, None, None, **kwargs)
except Exception:
pass
评论列表
文章目录