Merge lp:~oubiwann/txaws/920227-fix-pep8-pyflakes-errors into lp:txaws

Proposed by Duncan McGreggor
Status: Merged
Approved by: Duncan McGreggor
Approved revision: 122
Merged at revision: 115
Proposed branch: lp:~oubiwann/txaws/920227-fix-pep8-pyflakes-errors
Merge into: lp:txaws
Diff against target: 475 lines (+75/-50)
21 files modified
txaws/client/discover/command.py (+2/-1)
txaws/client/gui/gtk.py (+2/-1)
txaws/client/gui/tests/test_gtk.py (+0/-1)
txaws/ec2/exception.py (+0/-3)
txaws/ec2/tests/test_client.py (+4/-2)
txaws/ec2/tests/test_model.py (+6/-6)
txaws/exception.py (+0/-1)
txaws/meta.py (+0/-1)
txaws/reactor.py (+1/-0)
txaws/s3/client.py (+2/-1)
txaws/s3/tests/test_acls.py (+4/-2)
txaws/s3/tests/test_client.py (+2/-2)
txaws/server/tests/fixtures/amodule.py (+1/-0)
txaws/server/tests/fixtures/importerror/amodule.py (+2/-1)
txaws/server/tests/test_exception.py (+1/-1)
txaws/server/tests/test_registry.py (+1/-0)
txaws/server/tests/test_schema.py (+1/-1)
txaws/testing/base.py (+0/-1)
txaws/testing/payload.py (+43/-22)
txaws/tests/__init__.py (+0/-1)
txaws/tests/test_util.py (+3/-2)
To merge this branch: bzr merge lp:~oubiwann/txaws/920227-fix-pep8-pyflakes-errors
Reviewer Review Type Date Requested Status
Thomas Herve Approve
Review via email: mp+89619@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Thomas Herve (therve) wrote :

Cool, +1!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'txaws/client/discover/command.py'
--- txaws/client/discover/command.py 2011-09-30 14:35:08 +0000
+++ txaws/client/discover/command.py 2012-01-23 01:30:30 +0000
@@ -72,7 +72,8 @@
72 print >> self.output, "URL: %s" % query.client.url72 print >> self.output, "URL: %s" % query.client.url
73 print >> self.output73 print >> self.output
74 if getattr(query.client, "status", None) is not None:74 if getattr(query.client, "status", None) is not None:
75 print >> self.output, "HTTP status code: %s" % query.client.status75 print >> self.output, "HTTP status code: %s" % (
76 query.client.status,)
76 print >> self.output77 print >> self.output
77 print >> self.output, message78 print >> self.output, message
7879
7980
=== modified file 'txaws/client/gui/gtk.py'
--- txaws/client/gui/gtk.py 2010-02-12 23:12:17 +0000
+++ txaws/client/gui/gtk.py 2012-01-23 01:30:30 +0000
@@ -63,7 +63,7 @@
6363
64 def set_region(self, creds):64 def set_region(self, creds):
65 from txaws.service import AWSServiceRegion65 from txaws.service import AWSServiceRegion
66 self.region = AWSServiceRegion(creds)66 self.region = AWSServiceRegion(creds)
6767
68 def create_client(self, creds):68 def create_client(self, creds):
69 if creds is not None:69 if creds is not None:
@@ -98,6 +98,7 @@
98 gtk.STOCK_CANCEL,98 gtk.STOCK_CANCEL,
99 gtk.RESPONSE_REJECT))99 gtk.RESPONSE_REJECT))
100 content = self.password_dialog.get_content_area()100 content = self.password_dialog.get_content_area()
101
101 def add_entry(name):102 def add_entry(name):
102 box = gtk.HBox()103 box = gtk.HBox()
103 box.show()104 box.show()
104105
=== modified file 'txaws/client/gui/tests/test_gtk.py'
--- txaws/client/gui/tests/test_gtk.py 2009-04-26 08:32:36 +0000
+++ txaws/client/gui/tests/test_gtk.py 2012-01-23 01:30:30 +0000
@@ -8,4 +8,3 @@
88
9 pass9 pass
10 # Really need some, but UI testing hurts my brain.10 # Really need some, but UI testing hurts my brain.
11
1211
=== modified file 'txaws/ec2/exception.py'
--- txaws/ec2/exception.py 2011-04-21 13:10:37 +0000
+++ txaws/ec2/exception.py 2012-01-23 01:30:30 +0000
@@ -15,6 +15,3 @@
15 data = self._node_to_dict(error)15 data = self._node_to_dict(error)
16 if data:16 if data:
17 self.errors.append(data)17 self.errors.append(data)
18
19
20
2118
=== modified file 'txaws/ec2/tests/test_client.py'
--- txaws/ec2/tests/test_client.py 2011-08-29 19:51:50 +0000
+++ txaws/ec2/tests/test_client.py 2012-01-23 01:30:30 +0000
@@ -139,7 +139,8 @@
139139
140 def submit(self):140 def submit(self):
141 return succeed(141 return succeed(
142 payload.sample_describe_availability_zones_multiple_results)142 payload.
143 sample_describe_availability_zones_multiple_results)
143144
144 def check_parsed_availability_zones(results):145 def check_parsed_availability_zones(results):
145 self.assertEquals(len(results), 3)146 self.assertEquals(len(results), 3)
@@ -1751,7 +1752,8 @@
1751 "&SignatureVersion=2&"1752 "&SignatureVersion=2&"
1752 "Timestamp=2007-11-12T13%3A14%3A15Z&Version=2008-12-01&"1753 "Timestamp=2007-11-12T13%3A14%3A15Z&Version=2008-12-01&"
1753 "argwithnovalue=&fu%20n=g%2Fames")1754 "argwithnovalue=&fu%20n=g%2Fames")
1754 self.assertEqual(expected_params, signature.get_canonical_query_params())1755 self.assertEqual(
1756 expected_params, signature.get_canonical_query_params())
17551757
1756 def test_signing_text(self):1758 def test_signing_text(self):
1757 signature = client.Signature(self.creds, self.endpoint, self.params)1759 signature = client.Signature(self.creds, self.endpoint, self.params)
17581760
=== modified file 'txaws/ec2/tests/test_model.py'
--- txaws/ec2/tests/test_model.py 2009-09-15 21:15:19 +0000
+++ txaws/ec2/tests/test_model.py 2012-01-23 01:30:30 +0000
@@ -28,12 +28,12 @@
28 "name", "desc", owner_id="me", groups=user_group_pairs, ips=ips)28 "name", "desc", owner_id="me", groups=user_group_pairs, ips=ips)
29 self.assertEquals(group.name, "name")29 self.assertEquals(group.name, "name")
30 self.assertEquals(group.description, "desc")30 self.assertEquals(group.description, "desc")
31 self.assertEquals(group.owner_id, "me") 31 self.assertEquals(group.owner_id, "me")
32 self.assertEquals(group.allowed_groups[0].user_id, "somegal24") 32 self.assertEquals(group.allowed_groups[0].user_id, "somegal24")
33 self.assertEquals(group.allowed_groups[0].group_name, "other1") 33 self.assertEquals(group.allowed_groups[0].group_name, "other1")
34 self.assertEquals(group.allowed_groups[1].user_id, "somegal24") 34 self.assertEquals(group.allowed_groups[1].user_id, "somegal24")
35 self.assertEquals(group.allowed_groups[1].group_name, "other2") 35 self.assertEquals(group.allowed_groups[1].group_name, "other2")
36 self.assertEquals(group.allowed_ips[0].cidr_ip, "10.0.1.0/24") 36 self.assertEquals(group.allowed_ips[0].cidr_ip, "10.0.1.0/24")
3737
3838
39class UserIDGroupPairTestCase(TXAWSTestCase):39class UserIDGroupPairTestCase(TXAWSTestCase):
4040
=== modified file 'txaws/exception.py'
--- txaws/exception.py 2010-03-29 17:16:46 +0000
+++ txaws/exception.py 2012-01-23 01:30:30 +0000
@@ -122,7 +122,6 @@
122 return self.errors[0]["Message"]122 return self.errors[0]["Message"]
123123
124124
125
126class AWSResponseParseError(Exception):125class AWSResponseParseError(Exception):
127 """126 """
128 txAWS was unable to parse the server response.127 txAWS was unable to parse the server response.
129128
=== modified file 'txaws/meta.py'
--- txaws/meta.py 2009-12-08 04:08:53 +0000
+++ txaws/meta.py 2012-01-23 01:30:30 +0000
@@ -7,4 +7,3 @@
7description = """7description = """
8Twisted-based Asynchronous Libraries for Amazon Web Services8Twisted-based Asynchronous Libraries for Amazon Web Services
9"""9"""
10
1110
=== modified file 'txaws/reactor.py'
--- txaws/reactor.py 2010-01-13 19:56:00 +0000
+++ txaws/reactor.py 2012-01-23 01:30:30 +0000
@@ -1,5 +1,6 @@
1'''Reactor utilities.'''1'''Reactor utilities.'''
22
3
3def get_exitcode_reactor():4def get_exitcode_reactor():
4 """5 """
5 This is only neccesary until a fix like the one outlined here is6 This is only neccesary until a fix like the one outlined here is
67
=== modified file 'txaws/s3/client.py'
--- txaws/s3/client.py 2012-01-06 00:00:22 +0000
+++ txaws/s3/client.py 2012-01-23 01:30:30 +0000
@@ -61,7 +61,8 @@
61 def get_url(self):61 def get_url(self):
62 if self.endpoint.port is not None:62 if self.endpoint.port is not None:
63 return "%s://%s:%d%s" % (63 return "%s://%s:%d%s" % (
64 self.endpoint.scheme, self.get_host(), self.endpoint.port, self.get_path())64 self.endpoint.scheme, self.get_host(), self.endpoint.port,
65 self.get_path())
65 else:66 else:
66 return "%s://%s%s" % (67 return "%s://%s%s" % (
67 self.endpoint.scheme, self.get_host(), self.get_path())68 self.endpoint.scheme, self.get_host(), self.get_path())
6869
=== modified file 'txaws/s3/tests/test_acls.py'
--- txaws/s3/tests/test_acls.py 2011-03-26 12:50:41 +0000
+++ txaws/s3/tests/test_acls.py 2012-01-23 01:30:30 +0000
@@ -22,7 +22,8 @@
22 display_name='BucketOwnersEmail@amazon.com')22 display_name='BucketOwnersEmail@amazon.com')
23 xml_bytes = grantee.to_xml()23 xml_bytes = grantee.to_xml()
24 self.assertEquals(xml_bytes, """\24 self.assertEquals(xml_bytes, """\
25<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">25<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
26 xsi:type="CanonicalUser">
26 <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>27 <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>
27 <DisplayName>BucketOwnersEmail@amazon.com</DisplayName>28 <DisplayName>BucketOwnersEmail@amazon.com</DisplayName>
28</Grantee>29</Grantee>
@@ -35,7 +36,8 @@
35 xml_bytes = grant.to_xml()36 xml_bytes = grant.to_xml()
36 self.assertEquals(xml_bytes, """\37 self.assertEquals(xml_bytes, """\
37<Grant>38<Grant>
38 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">39 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
40 xsi:type="CanonicalUser">
39 <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>41 <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>
40 <DisplayName>BucketOwnersEmail@amazon.com</DisplayName>42 <DisplayName>BucketOwnersEmail@amazon.com</DisplayName>
41 </Grantee>43 </Grantee>
4244
=== modified file 'txaws/s3/tests/test_client.py'
--- txaws/s3/tests/test_client.py 2012-01-06 09:51:07 +0000
+++ txaws/s3/tests/test_client.py 2012-01-23 01:30:30 +0000
@@ -63,7 +63,7 @@
63 "http://localhost/mydocs/notes.txt")63 "http://localhost/mydocs/notes.txt")
6464
65 def test_custom_port_endpoint(self):65 def test_custom_port_endpoint(self):
66 test_uri='http://0.0.0.0:12345/'66 test_uri = 'http://0.0.0.0:12345/'
67 endpoint = AWSServiceEndpoint(uri=test_uri)67 endpoint = AWSServiceEndpoint(uri=test_uri)
68 self.assertEquals(endpoint.port, 12345)68 self.assertEquals(endpoint.port, 12345)
69 self.assertEquals(endpoint.scheme, 'http')69 self.assertEquals(endpoint.scheme, 'http')
@@ -74,7 +74,7 @@
74 self.assertEquals(context.get_url(), test_uri + 'foo/bar')74 self.assertEquals(context.get_url(), test_uri + 'foo/bar')
7575
76 def test_custom_port_endpoint_https(self):76 def test_custom_port_endpoint_https(self):
77 test_uri='https://0.0.0.0:12345/'77 test_uri = 'https://0.0.0.0:12345/'
78 endpoint = AWSServiceEndpoint(uri=test_uri)78 endpoint = AWSServiceEndpoint(uri=test_uri)
79 self.assertEquals(endpoint.port, 12345)79 self.assertEquals(endpoint.port, 12345)
80 self.assertEquals(endpoint.scheme, 'https')80 self.assertEquals(endpoint.scheme, 'https')
8181
=== modified file 'txaws/server/tests/fixtures/amodule.py'
--- txaws/server/tests/fixtures/amodule.py 2011-08-28 20:45:42 +0000
+++ txaws/server/tests/fixtures/amodule.py 2012-01-23 01:30:30 +0000
@@ -1,6 +1,7 @@
1from txaws.server.tests.fixtures import method1from txaws.server.tests.fixtures import method
2from txaws.server.method import Method2from txaws.server.method import Method
33
4
4@method5@method
5class TestMethod(Method):6class TestMethod(Method):
6 pass7 pass
78
=== modified file 'txaws/server/tests/fixtures/importerror/amodule.py'
--- txaws/server/tests/fixtures/importerror/amodule.py 2011-08-28 20:45:42 +0000
+++ txaws/server/tests/fixtures/importerror/amodule.py 2012-01-23 01:30:30 +0000
@@ -1,5 +1,6 @@
1from txaws.server.method import Method1from txaws.server.method import Method
2from txaws.server.tests.fixtures import method 2from txaws.server.tests.fixtures import method
3
34
4@method5@method
5class TestMethod(Method):6class TestMethod(Method):
67
=== modified file 'txaws/server/tests/test_exception.py'
--- txaws/server/tests/test_exception.py 2011-12-01 14:19:12 +0000
+++ txaws/server/tests/test_exception.py 2012-01-23 01:30:30 +0000
@@ -54,7 +54,7 @@
5454
55 def test_with_unicode_message(self):55 def test_with_unicode_message(self):
56 """56 """
57 L{APIError} will convert message to plain ASCII if converted to string. 57 L{APIError} will convert message to plain ASCII if converted to string.
58 """58 """
59 error = APIError(400, code="APIError", message=u"cittá")59 error = APIError(400, code="APIError", message=u"cittá")
60 self.assertEqual(u"cittá", error.message)60 self.assertEqual(u"cittá", error.message)
6161
=== modified file 'txaws/server/tests/test_registry.py'
--- txaws/server/tests/test_registry.py 2011-08-28 20:36:04 +0000
+++ txaws/server/tests/test_registry.py 2012-01-23 01:30:30 +0000
@@ -98,6 +98,7 @@
98 deal with scanning errors.98 deal with scanning errors.
99 """99 """
100 swallowed = []100 swallowed = []
101
101 def swallow(error):102 def swallow(error):
102 swallowed.append(error)103 swallowed.append(error)
103104
104105
=== modified file 'txaws/server/tests/test_schema.py'
--- txaws/server/tests/test_schema.py 2012-01-06 01:01:10 +0000
+++ txaws/server/tests/test_schema.py 2012-01-23 01:30:30 +0000
@@ -328,7 +328,7 @@
328 """328 """
329 parameter = Date("Test")329 parameter = Date("Test")
330 date = datetime(2010, 9, 15, 23, 59, 59,330 date = datetime(2010, 9, 15, 23, 59, 59,
331 tzinfo=tzoffset('UTC', 120*60))331 tzinfo=tzoffset('UTC', 120 * 60))
332 self.assertEqual("2010-09-15T21:59:59Z", parameter.format(date))332 self.assertEqual("2010-09-15T21:59:59Z", parameter.format(date))
333333
334334
335335
=== modified file 'txaws/testing/base.py'
--- txaws/testing/base.py 2010-06-04 19:00:25 +0000
+++ txaws/testing/base.py 2012-01-23 01:30:30 +0000
@@ -24,4 +24,3 @@
24 for key in set(os.environ) - set(self.orig_environ):24 for key in set(os.environ) - set(self.orig_environ):
25 del os.environ[key]25 del os.environ[key]
26 os.environ.update(self.orig_environ)26 os.environ.update(self.orig_environ)
27
2827
=== modified file 'txaws/testing/payload.py'
--- txaws/testing/payload.py 2011-08-29 19:51:50 +0000
+++ txaws/testing/payload.py 2012-01-23 01:30:30 +0000
@@ -22,7 +22,8 @@
22 <code>16</code>22 <code>16</code>
23 <name>running</name>23 <name>running</name>
24 </instanceState>24 </instanceState>
25 <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal</privateDnsName>25 <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal\
26</privateDnsName>
26 <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName>27 <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName>
27 <instanceType>c1.xlarge</instanceType>28 <instanceType>c1.xlarge</instanceType>
28 <launchTime>2009-04-27T02:23:18.000Z</launchTime>29 <launchTime>2009-04-27T02:23:18.000Z</launchTime>
@@ -58,7 +59,8 @@
58 <code>16</code>59 <code>16</code>
59 <name>running</name>60 <name>running</name>
60 </instanceState>61 </instanceState>
61 <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal</privateDnsName>62 <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal\
63</privateDnsName>
62 <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName>64 <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName>
63 <reason/>65 <reason/>
64 <keyName>keyname</keyName>66 <keyName>keyname</keyName>
@@ -494,7 +496,8 @@
494 <Errors>496 <Errors>
495 <Error>497 <Error>
496 <Code>InvalidGroup.InUse</Code>498 <Code>InvalidGroup.InUse</Code>
497 <Message>Group groupID1:GroupReferredTo is used by groups: groupID2:UsingGroup</Message>499 <Message>Group groupID1:GroupReferredTo is used by groups: \
500groupID2:UsingGroup</Message>
498 </Error>501 </Error>
499 </Errors>502 </Errors>
500 <RequestID>9a6df05f-9c27-47aa-81d8-6619689210cc</RequestID>503 <RequestID>9a6df05f-9c27-47aa-81d8-6619689210cc</RequestID>
@@ -503,7 +506,8 @@
503506
504507
505sample_authorize_security_group = """\508sample_authorize_security_group = """\
506<AuthorizeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/%s/">509<AuthorizeSecurityGroupIngressResponse\
510 xmlns="http://ec2.amazonaws.com/doc/%s/">
507 <return>true</return>511 <return>true</return>
508</AuthorizeSecurityGroupIngressResponse>512</AuthorizeSecurityGroupIngressResponse>
509""" % (version.ec2_api,)513""" % (version.ec2_api,)
@@ -650,7 +654,8 @@
650 <keySet>654 <keySet>
651 <item>655 <item>
652 <keyName>gsg-keypair</keyName>656 <keyName>gsg-keypair</keyName>
653 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>657 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
658ca:9f:f5:f1:6f</keyFingerprint>
654 </item>659 </item>
655 </keySet>660 </keySet>
656</DescribeKeyPairsResponse>661</DescribeKeyPairsResponse>
@@ -663,11 +668,13 @@
663 <keySet>668 <keySet>
664 <item>669 <item>
665 <keyName>gsg-keypair-1</keyName>670 <keyName>gsg-keypair-1</keyName>
666 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>671 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
672ca:9f:f5:f1:6f</keyFingerprint>
667 </item>673 </item>
668 <item>674 <item>
669 <keyName>gsg-keypair-2</keyName>675 <keyName>gsg-keypair-2</keyName>
670 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:70</keyFingerprint>676 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
677ca:9f:f5:f1:70</keyFingerprint>
671 </item>678 </item>
672 </keySet>679 </keySet>
673</DescribeKeyPairsResponse>680</DescribeKeyPairsResponse>
@@ -678,7 +685,8 @@
678<?xml version="1.0"?>685<?xml version="1.0"?>
679<CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/">686<CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
680 <keyName>example-key-name</keyName>687 <keyName>example-key-name</keyName>
681 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>688 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
689ca:9f:f5:f1:6f</keyFingerprint>
682 <keyMaterial>-----BEGIN RSA PRIVATE KEY-----690 <keyMaterial>-----BEGIN RSA PRIVATE KEY-----
683MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp691MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp
684HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg692HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg
@@ -747,7 +755,8 @@
747<?xml version="1.0"?>755<?xml version="1.0"?>
748<ImportKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/">756<ImportKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
749 <keyName>example-key-name</keyName>757 <keyName>example-key-name</keyName>
750 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>758 <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
759ca:9f:f5:f1:6f</keyFingerprint>
751</ImportKeyPairResponse>760</ImportKeyPairResponse>
752""" % (version.ec2_api,)761""" % (version.ec2_api,)
753762
@@ -837,7 +846,8 @@
837 <Errors>846 <Errors>
838 <Error>847 <Error>
839 <Code>InvalidClientTokenId</Code>848 <Code>InvalidClientTokenId</Code>
840 <Message>The AWS Access Key Id you provided does not exist in our records.</Message>849 <Message>The AWS Access Key Id you provided does not exist in our\
850 records.</Message>
841 </Error>851 </Error>
842 </Errors>852 </Errors>
843 <RequestID>47bfd77d-78d6-446d-be0d-f7621795dded</RequestID>853 <RequestID>47bfd77d-78d6-446d-be0d-f7621795dded</RequestID>
@@ -865,7 +875,8 @@
865 <Code>InternalError</Code>875 <Code>InternalError</Code>
866 <Message>We encountered an internal error. Please try again.</Message>876 <Message>We encountered an internal error. Please try again.</Message>
867 <RequestID>A2A7E5395E27DFBB</RequestID>877 <RequestID>A2A7E5395E27DFBB</RequestID>
868 <HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K</HostID>878 <HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K\
879</HostID>
869</Error>880</Error>
870"""881"""
871882
@@ -926,7 +937,8 @@
926937
927938
928sample_get_bucket_location_result = """\939sample_get_bucket_location_result = """\
929<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU</LocationConstraint>940<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU\
941</LocationConstraint>
930942
931"""943"""
932sample_request_payment = """\944sample_request_payment = """\
@@ -940,12 +952,18 @@
940<?xml version="1.0" encoding="UTF-8"?>952<?xml version="1.0" encoding="UTF-8"?>
941<Error>953<Error>
942 <Code>SignatureDoesNotMatch</Code>954 <Code>SignatureDoesNotMatch</Code>
943 <Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>955 <Message>The request signature we calculated does not match the signature\
944 <StringToSignBytes>47 45 54 0a 31 42 32 4d 32 59 38 41 73 67 54 70 67 41 6d 59 37 50 68 43 66 67 3d 3d 0a 0a 54 68 75 2c 20 30 35 20 4e 6f 76 20 32 30 30 39 20 32 31 3a 33 33 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes>956 you provided. Check your key and signing method.</Message>
957 <StringToSignBytes>47 45 54 0a 31 42 32 4d 32 59 38 41 73 67 54 70 67 41 6d\
958 59 37 50 68 43 66 67 3d 3d 0a 0a 54 68 75 2c 20 30 35 20 4e 6f 76 20 32 30\
959 30 39 20 32 31 3a 33 33 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes>
945 <RequestId>AB9216C8640751B2</RequestId>960 <RequestId>AB9216C8640751B2</RequestId>
946 <HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5</HostId>961 <HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5\
947 <SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU=</SignatureProvided>962</HostId>
948 <StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29 GMT\n/</StringToSign>963 <SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU=
964</SignatureProvided>
965 <StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29\
966 GMT\n/</StringToSign>
949 <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>967 <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>
950</Error>968</Error>
951"""969"""
@@ -955,9 +973,11 @@
955<?xml version="1.0" encoding="UTF-8"?>973<?xml version="1.0" encoding="UTF-8"?>
956<Error>974<Error>
957 <Code>InvalidAccessKeyId</Code>975 <Code>InvalidAccessKeyId</Code>
958 <Message>The AWS Access Key Id you provided does not exist in our records.</Message>976 <Message>The AWS Access Key Id you provided does not exist in our records.\
977</Message>
959 <RequestId>0223AD81A94821CE</RequestId>978 <RequestId>0223AD81A94821CE</RequestId>
960 <HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE</HostId>979 <HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE\
980</HostId>
961 <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>981 <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>
962</Error>982</Error>
963"""983"""
@@ -970,14 +990,16 @@
970 </Owner>990 </Owner>
971 <AccessControlList>991 <AccessControlList>
972 <Grant>992 <Grant>
973 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">993 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
994 xsi:type="CanonicalUser">
974 <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>995 <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>
975 <DisplayName>foo@example.net</DisplayName>996 <DisplayName>foo@example.net</DisplayName>
976 </Grantee>997 </Grantee>
977 <Permission>FULL_CONTROL</Permission>998 <Permission>FULL_CONTROL</Permission>
978 </Grant>999 </Grant>
979 <Grant>1000 <Grant>
980 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">1001 <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
1002 xsi:type="CanonicalUser">
981 <ID>8a6925ce4adf588a4f21c32aa37900feed</ID>1003 <ID>8a6925ce4adf588a4f21c32aa37900feed</ID>
982 <DisplayName>bar@example.net</DisplayName>1004 <DisplayName>bar@example.net</DisplayName>
983 </Grantee>1005 </Grantee>
@@ -985,4 +1007,3 @@
985 </Grant>1007 </Grant>
986 </AccessControlList>1008 </AccessControlList>
987</AccessControlPolicy>"""1009</AccessControlPolicy>"""
988
9891010
=== modified file 'txaws/tests/__init__.py'
--- txaws/tests/__init__.py 2009-08-28 02:32:44 +0000
+++ txaws/tests/__init__.py 2012-01-23 01:30:30 +0000
@@ -1,1 +0,0 @@
1
20
=== modified file 'txaws/tests/test_util.py'
--- txaws/tests/test_util.py 2009-11-19 16:33:05 +0000
+++ txaws/tests/test_util.py 2012-01-23 01:30:30 +0000
@@ -4,6 +4,7 @@
44
5from txaws.util import hmac_sha1, iso8601time, parse5from txaws.util import hmac_sha1, iso8601time, parse
66
7
7class MiscellaneousTests(TestCase):8class MiscellaneousTests(TestCase):
89
9 def test_hmac_sha1(self):10 def test_hmac_sha1(self):
@@ -20,8 +21,8 @@
20 self.assertEqual(hmac_sha1(key, data), expected)21 self.assertEqual(hmac_sha1(key, data), expected)
2122
22 def test_iso8601time(self):23 def test_iso8601time(self):
23 self.assertEqual("2006-07-07T15:04:56Z", iso8601time((2006,7,7,15,4,56,24 self.assertEqual("2006-07-07T15:04:56Z",
24 0, 0, 0)))25 iso8601time((2006, 7, 7, 15, 4, 56, 0, 0, 0)))
2526
2627
27class ParseUrlTestCase(TestCase):28class ParseUrlTestCase(TestCase):

Subscribers

People subscribed via source and target branches

to all changes: