def test_find_usage_vpcs(self): response = result_fixtures.VPC.test_find_usage_vpcs mock_conn = Mock() mock_conn.describe_vpcs.return_value = response cls = _VpcService(21, 43) cls.conn = mock_conn cls._find_usage_vpcs() assert len(cls.limits['VPCs'].get_current_usage()) == 1 assert cls.limits['VPCs'].get_current_usage()[0].get_value() == 2 assert mock_conn.mock_calls == [call.describe_vpcs()]
def test_find_usage_vpcs(self): response = result_fixtures.VPC.test_find_usage_vpcs mock_conn = Mock() mock_conn.describe_vpcs.return_value = response cls = _VpcService(21, 43) cls.conn = mock_conn cls._find_usage_vpcs() assert len(cls.limits['VPCs'].get_current_usage()) == 1 assert cls.limits['VPCs'].get_current_usage()[0].get_value() == 2 assert mock_conn.mock_calls == [ call.describe_vpcs() ]
def test_find_usage_vpcs(self): response = result_fixtures.VPC.test_find_usage_vpcs mock_conn = Mock() mock_conn.describe_vpcs.return_value = response cls = _VpcService(21, 43, {}, None) cls._current_account_id = '0123456789' cls.conn = mock_conn cls._find_usage_vpcs() assert len(cls.limits['VPCs'].get_current_usage()) == 1 assert cls.limits['VPCs'].get_current_usage()[0].get_value() == 2 assert mock_conn.mock_calls == [ call.describe_vpcs(Filters=[{ 'Name': 'owner-id', 'Values': ['0123456789'] }]) ]