~dkeeney/txaws/add-multipart-upload

« back to all changes in this revision

Viewing changes to txaws/ec2/tests/test_client.py

Merge allow-expires-bug-633580 [a=bjornt] [r=free.ekanayaka,lifeless] [f=633580]

Allow the Expires parameter to be used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1471
1471
             "Timestamp": "2007-11-12T13:14:15Z",
1472
1472
             "Version": "2008-12-01"})
1473
1473
 
 
1474
    def test_no_timestamp_if_expires_in_other_params(self):
 
1475
        """
 
1476
        If Expires is present in other_params, Timestamp won't be added,
 
1477
        since a request should contain either Expires or Timestamp, but
 
1478
        not both.
 
1479
        """
 
1480
        query = client.Query(
 
1481
            action="DescribeInstances", creds=self.creds,
 
1482
            endpoint=self.endpoint,
 
1483
            other_params={"Expires": "2007-11-12T13:14:15Z"})
 
1484
        self.assertEqual(
 
1485
            query.params,
 
1486
            {"AWSAccessKeyId": "foo",
 
1487
             "Action": "DescribeInstances",
 
1488
             "SignatureVersion": "2",
 
1489
             "Expires": "2007-11-12T13:14:15Z",
 
1490
             "Version": "2008-12-01"})
 
1491
 
1474
1492
    def test_sorted_params(self):
1475
1493
        query = client.Query(
1476
1494
            action="DescribeInstances", creds=self.creds,