diff --git a/nodepool/tests/unit/test_driver_aws.py b/nodepool/tests/unit/test_driver_aws.py index 209eb674f..71f08b16e 100644 --- a/nodepool/tests/unit/test_driver_aws.py +++ b/nodepool/tests/unit/test_driver_aws.py @@ -498,7 +498,9 @@ class TestDriverAws(tests.DBTestCase): image = self.ec2.Image(image_id) try: # If this has a value the image was not deleted - self.assertIsNone(image.state) + if image.state == 'available': + # Definitely not deleted yet + continue except AttributeError: # Per AWS API, a recently deleted image is empty and # looking at the state raises an AttributeFailure; see