示例#1
0
 def test_delete_if_does_not_exist(self):
     client = boto3.client('ec2', region_name=aws_region)
     success, changed, err_msg, _ = (ng.remove(client,
                                               'nat-12345',
                                               check_mode=True))
     self.assertFalse(success)
     self.assertFalse(changed)
示例#2
0
 def test_delete(self):
     client = boto3.client('ec2', region_name=aws_region)
     success, changed, err_msg, _ = (ng.remove(client,
                                               'nat-123456789',
                                               check_mode=True))
     self.assertTrue(success)
     self.assertTrue(changed)
 def test_delete_if_does_not_exist(self):
     client = boto3.client('ec2', region_name=aws_region)
     success, changed, err_msg, _ = (
         ng.remove(
             client, 'nat-12345', check_mode=True
         )
     )
     self.assertFalse(success)
     self.assertFalse(changed)
 def test_delete_and_release_ip(self):
     client = boto3.client('ec2', region_name=aws_region)
     success, changed, err_msg, _ = (
         ng.remove(
             client, 'nat-123456789', release_eip=True, check_mode=True
         )
     )
     self.assertTrue(success)
     self.assertTrue(changed)