コード例 #1
0
 def test_get_eip_allocation_id_by_address_does_not_exist(self):
     client = boto3.client('ec2', region_name=aws_region)
     allocation_id, err_msg = (
         ng.get_eip_allocation_id_by_address(
             client, '52.52.52.52', check_mode=True
         )
     )
     self.assertEqual(err_msg, 'EIP 52.52.52.52 does not exist')
     self.assertTrue(allocation_id is None)
コード例 #2
0
 def test_get_eip_allocation_id_by_address(self):
     client = boto3.client('ec2', region_name=aws_region)
     allocation_id, _ = (
         ng.get_eip_allocation_id_by_address(
             client, '55.55.55.55', check_mode=True
         )
     )
     should_return = 'eipalloc-1234567'
     self.assertEqual(allocation_id, should_return)