| OLD | NEW |
| 1 from tests.unit import AWSMockServiceTestCase | 1 from tests.unit import AWSMockServiceTestCase |
| 2 | 2 |
| 3 from boto.ec2.connection import EC2Connection | 3 from boto.ec2.connection import EC2Connection |
| 4 from boto.ec2.snapshot import Snapshot | 4 from boto.ec2.snapshot import Snapshot |
| 5 | 5 |
| 6 | 6 |
| 7 class TestDescribeSnapshots(AWSMockServiceTestCase): | 7 class TestDescribeSnapshots(AWSMockServiceTestCase): |
| 8 | 8 |
| 9 connection_class = EC2Connection | 9 connection_class = EC2Connection |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 <progress>30%</progress> | 21 <progress>30%</progress> |
| 22 <ownerId>111122223333</ownerId> | 22 <ownerId>111122223333</ownerId> |
| 23 <volumeSize>15</volumeSize> | 23 <volumeSize>15</volumeSize> |
| 24 <description>Daily Backup</description> | 24 <description>Daily Backup</description> |
| 25 <tagSet> | 25 <tagSet> |
| 26 <item> | 26 <item> |
| 27 <key>Purpose</key> | 27 <key>Purpose</key> |
| 28 <value>demo_db_14_backup</value> | 28 <value>demo_db_14_backup</value> |
| 29 </item> | 29 </item> |
| 30 </tagSet> | 30 </tagSet> |
| 31 <encrypted>false</encrypted> |
| 31 </item> | 32 </item> |
| 32 </snapshotSet> | 33 </snapshotSet> |
| 33 </DescribeSnapshotsResponse> | 34 </DescribeSnapshotsResponse> |
| 34 """ | 35 """ |
| 35 | 36 |
| 36 def test_cancel_spot_instance_requests(self): | 37 def test_describe_snapshots(self): |
| 37 self.set_http_response(status_code=200) | 38 self.set_http_response(status_code=200) |
| 38 response = self.service_connection.get_all_snapshots(['snap-1a2b3c4d', '
snap-9f8e7d6c'], | 39 response = self.service_connection.get_all_snapshots(['snap-1a2b3c4d', '
snap-9f8e7d6c'], |
| 39 owner=['self', '111
122223333'], | 40 owner=['self', '111
122223333'], |
| 40 restorable_by='9999
88887777', | 41 restorable_by='9999
88887777', |
| 41 filters={'status':
'pending', | 42 filters={'status':
'pending', |
| 42 'tag-value
': '*db_*'}) | 43 'tag-value
': '*db_*'}) |
| 43 self.assert_request_parameters({ | 44 self.assert_request_parameters({ |
| 44 'Action': 'DescribeSnapshots', | 45 'Action': 'DescribeSnapshots', |
| 45 'SnapshotId.1': 'snap-1a2b3c4d', | 46 'SnapshotId.1': 'snap-1a2b3c4d', |
| 46 'SnapshotId.2': 'snap-9f8e7d6c', | 47 'SnapshotId.2': 'snap-9f8e7d6c', |
| 47 'Owner.1': 'self', | 48 'Owner.1': 'self', |
| 48 'Owner.2': '111122223333', | 49 'Owner.2': '111122223333', |
| 49 'RestorableBy.1': '999988887777', | 50 'RestorableBy.1': '999988887777', |
| 50 'Filter.1.Name': 'status', | 51 'Filter.1.Name': 'status', |
| 51 'Filter.1.Value.1': 'pending', | 52 'Filter.1.Value.1': 'pending', |
| 52 'Filter.2.Name': 'tag-value', | 53 'Filter.2.Name': 'tag-value', |
| 53 'Filter.2.Value.1': '*db_*'}, | 54 'Filter.2.Value.1': '*db_*'}, |
| 54 ignore_params_values=['AWSAccessKeyId', 'SignatureMethod', | 55 ignore_params_values=['AWSAccessKeyId', 'SignatureMethod', |
| 55 'SignatureVersion', 'Timestamp', | 56 'SignatureVersion', 'Timestamp', |
| 56 'Version']) | 57 'Version']) |
| 57 self.assertEqual(len(response), 1) | 58 self.assertEqual(len(response), 1) |
| 58 self.assertIsInstance(response[0], Snapshot) | 59 self.assertIsInstance(response[0], Snapshot) |
| 59 self.assertEqual(response[0].id, 'snap-1a2b3c4d') | 60 self.assertEqual(response[0].id, 'snap-1a2b3c4d') |
| OLD | NEW |