Merge lp:~oubiwann/txaws/920227-fix-pep8-pyflakes-errors into lp:txaws
- 920227-fix-pep8-pyflakes-errors
- Merge into trunk
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Herve | Approve | ||
Review via email: mp+89619@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'txaws/client/discover/command.py' | |||
2 | --- txaws/client/discover/command.py 2011-09-30 14:35:08 +0000 | |||
3 | +++ txaws/client/discover/command.py 2012-01-23 01:30:30 +0000 | |||
4 | @@ -72,7 +72,8 @@ | |||
5 | 72 | print >> self.output, "URL: %s" % query.client.url | 72 | print >> self.output, "URL: %s" % query.client.url |
6 | 73 | print >> self.output | 73 | print >> self.output |
7 | 74 | if getattr(query.client, "status", None) is not None: | 74 | if getattr(query.client, "status", None) is not None: |
9 | 75 | print >> self.output, "HTTP status code: %s" % query.client.status | 75 | print >> self.output, "HTTP status code: %s" % ( |
10 | 76 | query.client.status,) | ||
11 | 76 | print >> self.output | 77 | print >> self.output |
12 | 77 | print >> self.output, message | 78 | print >> self.output, message |
13 | 78 | 79 | ||
14 | 79 | 80 | ||
15 | === modified file 'txaws/client/gui/gtk.py' | |||
16 | --- txaws/client/gui/gtk.py 2010-02-12 23:12:17 +0000 | |||
17 | +++ txaws/client/gui/gtk.py 2012-01-23 01:30:30 +0000 | |||
18 | @@ -63,7 +63,7 @@ | |||
19 | 63 | 63 | ||
20 | 64 | def set_region(self, creds): | 64 | def set_region(self, creds): |
21 | 65 | from txaws.service import AWSServiceRegion | 65 | from txaws.service import AWSServiceRegion |
23 | 66 | self.region = AWSServiceRegion(creds) | 66 | self.region = AWSServiceRegion(creds) |
24 | 67 | 67 | ||
25 | 68 | def create_client(self, creds): | 68 | def create_client(self, creds): |
26 | 69 | if creds is not None: | 69 | if creds is not None: |
27 | @@ -98,6 +98,7 @@ | |||
28 | 98 | gtk.STOCK_CANCEL, | 98 | gtk.STOCK_CANCEL, |
29 | 99 | gtk.RESPONSE_REJECT)) | 99 | gtk.RESPONSE_REJECT)) |
30 | 100 | content = self.password_dialog.get_content_area() | 100 | content = self.password_dialog.get_content_area() |
31 | 101 | |||
32 | 101 | def add_entry(name): | 102 | def add_entry(name): |
33 | 102 | box = gtk.HBox() | 103 | box = gtk.HBox() |
34 | 103 | box.show() | 104 | box.show() |
35 | 104 | 105 | ||
36 | === modified file 'txaws/client/gui/tests/test_gtk.py' | |||
37 | --- txaws/client/gui/tests/test_gtk.py 2009-04-26 08:32:36 +0000 | |||
38 | +++ txaws/client/gui/tests/test_gtk.py 2012-01-23 01:30:30 +0000 | |||
39 | @@ -8,4 +8,3 @@ | |||
40 | 8 | 8 | ||
41 | 9 | pass | 9 | pass |
42 | 10 | # Really need some, but UI testing hurts my brain. | 10 | # Really need some, but UI testing hurts my brain. |
43 | 11 | |||
44 | 12 | 11 | ||
45 | === modified file 'txaws/ec2/exception.py' | |||
46 | --- txaws/ec2/exception.py 2011-04-21 13:10:37 +0000 | |||
47 | +++ txaws/ec2/exception.py 2012-01-23 01:30:30 +0000 | |||
48 | @@ -15,6 +15,3 @@ | |||
49 | 15 | data = self._node_to_dict(error) | 15 | data = self._node_to_dict(error) |
50 | 16 | if data: | 16 | if data: |
51 | 17 | self.errors.append(data) | 17 | self.errors.append(data) |
52 | 18 | |||
53 | 19 | |||
54 | 20 | |||
55 | 21 | 18 | ||
56 | === modified file 'txaws/ec2/tests/test_client.py' | |||
57 | --- txaws/ec2/tests/test_client.py 2011-08-29 19:51:50 +0000 | |||
58 | +++ txaws/ec2/tests/test_client.py 2012-01-23 01:30:30 +0000 | |||
59 | @@ -139,7 +139,8 @@ | |||
60 | 139 | 139 | ||
61 | 140 | def submit(self): | 140 | def submit(self): |
62 | 141 | return succeed( | 141 | return succeed( |
64 | 142 | payload.sample_describe_availability_zones_multiple_results) | 142 | payload. |
65 | 143 | sample_describe_availability_zones_multiple_results) | ||
66 | 143 | 144 | ||
67 | 144 | def check_parsed_availability_zones(results): | 145 | def check_parsed_availability_zones(results): |
68 | 145 | self.assertEquals(len(results), 3) | 146 | self.assertEquals(len(results), 3) |
69 | @@ -1751,7 +1752,8 @@ | |||
70 | 1751 | "&SignatureVersion=2&" | 1752 | "&SignatureVersion=2&" |
71 | 1752 | "Timestamp=2007-11-12T13%3A14%3A15Z&Version=2008-12-01&" | 1753 | "Timestamp=2007-11-12T13%3A14%3A15Z&Version=2008-12-01&" |
72 | 1753 | "argwithnovalue=&fu%20n=g%2Fames") | 1754 | "argwithnovalue=&fu%20n=g%2Fames") |
74 | 1754 | self.assertEqual(expected_params, signature.get_canonical_query_params()) | 1755 | self.assertEqual( |
75 | 1756 | expected_params, signature.get_canonical_query_params()) | ||
76 | 1755 | 1757 | ||
77 | 1756 | def test_signing_text(self): | 1758 | def test_signing_text(self): |
78 | 1757 | signature = client.Signature(self.creds, self.endpoint, self.params) | 1759 | signature = client.Signature(self.creds, self.endpoint, self.params) |
79 | 1758 | 1760 | ||
80 | === modified file 'txaws/ec2/tests/test_model.py' | |||
81 | --- txaws/ec2/tests/test_model.py 2009-09-15 21:15:19 +0000 | |||
82 | +++ txaws/ec2/tests/test_model.py 2012-01-23 01:30:30 +0000 | |||
83 | @@ -28,12 +28,12 @@ | |||
84 | 28 | "name", "desc", owner_id="me", groups=user_group_pairs, ips=ips) | 28 | "name", "desc", owner_id="me", groups=user_group_pairs, ips=ips) |
85 | 29 | self.assertEquals(group.name, "name") | 29 | self.assertEquals(group.name, "name") |
86 | 30 | self.assertEquals(group.description, "desc") | 30 | self.assertEquals(group.description, "desc") |
93 | 31 | self.assertEquals(group.owner_id, "me") | 31 | self.assertEquals(group.owner_id, "me") |
94 | 32 | self.assertEquals(group.allowed_groups[0].user_id, "somegal24") | 32 | self.assertEquals(group.allowed_groups[0].user_id, "somegal24") |
95 | 33 | self.assertEquals(group.allowed_groups[0].group_name, "other1") | 33 | self.assertEquals(group.allowed_groups[0].group_name, "other1") |
96 | 34 | self.assertEquals(group.allowed_groups[1].user_id, "somegal24") | 34 | self.assertEquals(group.allowed_groups[1].user_id, "somegal24") |
97 | 35 | self.assertEquals(group.allowed_groups[1].group_name, "other2") | 35 | self.assertEquals(group.allowed_groups[1].group_name, "other2") |
98 | 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") |
99 | 37 | 37 | ||
100 | 38 | 38 | ||
101 | 39 | class UserIDGroupPairTestCase(TXAWSTestCase): | 39 | class UserIDGroupPairTestCase(TXAWSTestCase): |
102 | 40 | 40 | ||
103 | === modified file 'txaws/exception.py' | |||
104 | --- txaws/exception.py 2010-03-29 17:16:46 +0000 | |||
105 | +++ txaws/exception.py 2012-01-23 01:30:30 +0000 | |||
106 | @@ -122,7 +122,6 @@ | |||
107 | 122 | return self.errors[0]["Message"] | 122 | return self.errors[0]["Message"] |
108 | 123 | 123 | ||
109 | 124 | 124 | ||
110 | 125 | |||
111 | 126 | class AWSResponseParseError(Exception): | 125 | class AWSResponseParseError(Exception): |
112 | 127 | """ | 126 | """ |
113 | 128 | txAWS was unable to parse the server response. | 127 | txAWS was unable to parse the server response. |
114 | 129 | 128 | ||
115 | === modified file 'txaws/meta.py' | |||
116 | --- txaws/meta.py 2009-12-08 04:08:53 +0000 | |||
117 | +++ txaws/meta.py 2012-01-23 01:30:30 +0000 | |||
118 | @@ -7,4 +7,3 @@ | |||
119 | 7 | description = """ | 7 | description = """ |
120 | 8 | Twisted-based Asynchronous Libraries for Amazon Web Services | 8 | Twisted-based Asynchronous Libraries for Amazon Web Services |
121 | 9 | """ | 9 | """ |
122 | 10 | |||
123 | 11 | 10 | ||
124 | === modified file 'txaws/reactor.py' | |||
125 | --- txaws/reactor.py 2010-01-13 19:56:00 +0000 | |||
126 | +++ txaws/reactor.py 2012-01-23 01:30:30 +0000 | |||
127 | @@ -1,5 +1,6 @@ | |||
128 | 1 | '''Reactor utilities.''' | 1 | '''Reactor utilities.''' |
129 | 2 | 2 | ||
130 | 3 | |||
131 | 3 | def get_exitcode_reactor(): | 4 | def get_exitcode_reactor(): |
132 | 4 | """ | 5 | """ |
133 | 5 | This is only neccesary until a fix like the one outlined here is | 6 | This is only neccesary until a fix like the one outlined here is |
134 | 6 | 7 | ||
135 | === modified file 'txaws/s3/client.py' | |||
136 | --- txaws/s3/client.py 2012-01-06 00:00:22 +0000 | |||
137 | +++ txaws/s3/client.py 2012-01-23 01:30:30 +0000 | |||
138 | @@ -61,7 +61,8 @@ | |||
139 | 61 | def get_url(self): | 61 | def get_url(self): |
140 | 62 | if self.endpoint.port is not None: | 62 | if self.endpoint.port is not None: |
141 | 63 | return "%s://%s:%d%s" % ( | 63 | return "%s://%s:%d%s" % ( |
143 | 64 | self.endpoint.scheme, self.get_host(), self.endpoint.port, self.get_path()) | 64 | self.endpoint.scheme, self.get_host(), self.endpoint.port, |
144 | 65 | self.get_path()) | ||
145 | 65 | else: | 66 | else: |
146 | 66 | return "%s://%s%s" % ( | 67 | return "%s://%s%s" % ( |
147 | 67 | self.endpoint.scheme, self.get_host(), self.get_path()) | 68 | self.endpoint.scheme, self.get_host(), self.get_path()) |
148 | 68 | 69 | ||
149 | === modified file 'txaws/s3/tests/test_acls.py' | |||
150 | --- txaws/s3/tests/test_acls.py 2011-03-26 12:50:41 +0000 | |||
151 | +++ txaws/s3/tests/test_acls.py 2012-01-23 01:30:30 +0000 | |||
152 | @@ -22,7 +22,8 @@ | |||
153 | 22 | display_name='BucketOwnersEmail@amazon.com') | 22 | display_name='BucketOwnersEmail@amazon.com') |
154 | 23 | xml_bytes = grantee.to_xml() | 23 | xml_bytes = grantee.to_xml() |
155 | 24 | self.assertEquals(xml_bytes, """\ | 24 | self.assertEquals(xml_bytes, """\ |
157 | 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"\ |
158 | 26 | xsi:type="CanonicalUser"> | ||
159 | 26 | <ID>8a6925ce4adf588a4f21c32aa379004fef</ID> | 27 | <ID>8a6925ce4adf588a4f21c32aa379004fef</ID> |
160 | 27 | <DisplayName>BucketOwnersEmail@amazon.com</DisplayName> | 28 | <DisplayName>BucketOwnersEmail@amazon.com</DisplayName> |
161 | 28 | </Grantee> | 29 | </Grantee> |
162 | @@ -35,7 +36,8 @@ | |||
163 | 35 | xml_bytes = grant.to_xml() | 36 | xml_bytes = grant.to_xml() |
164 | 36 | self.assertEquals(xml_bytes, """\ | 37 | self.assertEquals(xml_bytes, """\ |
165 | 37 | <Grant> | 38 | <Grant> |
167 | 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"\ |
168 | 40 | xsi:type="CanonicalUser"> | ||
169 | 39 | <ID>8a6925ce4adf588a4f21c32aa379004fef</ID> | 41 | <ID>8a6925ce4adf588a4f21c32aa379004fef</ID> |
170 | 40 | <DisplayName>BucketOwnersEmail@amazon.com</DisplayName> | 42 | <DisplayName>BucketOwnersEmail@amazon.com</DisplayName> |
171 | 41 | </Grantee> | 43 | </Grantee> |
172 | 42 | 44 | ||
173 | === modified file 'txaws/s3/tests/test_client.py' | |||
174 | --- txaws/s3/tests/test_client.py 2012-01-06 09:51:07 +0000 | |||
175 | +++ txaws/s3/tests/test_client.py 2012-01-23 01:30:30 +0000 | |||
176 | @@ -63,7 +63,7 @@ | |||
177 | 63 | "http://localhost/mydocs/notes.txt") | 63 | "http://localhost/mydocs/notes.txt") |
178 | 64 | 64 | ||
179 | 65 | def test_custom_port_endpoint(self): | 65 | def test_custom_port_endpoint(self): |
181 | 66 | test_uri='http://0.0.0.0:12345/' | 66 | test_uri = 'http://0.0.0.0:12345/' |
182 | 67 | endpoint = AWSServiceEndpoint(uri=test_uri) | 67 | endpoint = AWSServiceEndpoint(uri=test_uri) |
183 | 68 | self.assertEquals(endpoint.port, 12345) | 68 | self.assertEquals(endpoint.port, 12345) |
184 | 69 | self.assertEquals(endpoint.scheme, 'http') | 69 | self.assertEquals(endpoint.scheme, 'http') |
185 | @@ -74,7 +74,7 @@ | |||
186 | 74 | self.assertEquals(context.get_url(), test_uri + 'foo/bar') | 74 | self.assertEquals(context.get_url(), test_uri + 'foo/bar') |
187 | 75 | 75 | ||
188 | 76 | def test_custom_port_endpoint_https(self): | 76 | def test_custom_port_endpoint_https(self): |
190 | 77 | test_uri='https://0.0.0.0:12345/' | 77 | test_uri = 'https://0.0.0.0:12345/' |
191 | 78 | endpoint = AWSServiceEndpoint(uri=test_uri) | 78 | endpoint = AWSServiceEndpoint(uri=test_uri) |
192 | 79 | self.assertEquals(endpoint.port, 12345) | 79 | self.assertEquals(endpoint.port, 12345) |
193 | 80 | self.assertEquals(endpoint.scheme, 'https') | 80 | self.assertEquals(endpoint.scheme, 'https') |
194 | 81 | 81 | ||
195 | === modified file 'txaws/server/tests/fixtures/amodule.py' | |||
196 | --- txaws/server/tests/fixtures/amodule.py 2011-08-28 20:45:42 +0000 | |||
197 | +++ txaws/server/tests/fixtures/amodule.py 2012-01-23 01:30:30 +0000 | |||
198 | @@ -1,6 +1,7 @@ | |||
199 | 1 | from txaws.server.tests.fixtures import method | 1 | from txaws.server.tests.fixtures import method |
200 | 2 | from txaws.server.method import Method | 2 | from txaws.server.method import Method |
201 | 3 | 3 | ||
202 | 4 | |||
203 | 4 | @method | 5 | @method |
204 | 5 | class TestMethod(Method): | 6 | class TestMethod(Method): |
205 | 6 | pass | 7 | pass |
206 | 7 | 8 | ||
207 | === modified file 'txaws/server/tests/fixtures/importerror/amodule.py' | |||
208 | --- txaws/server/tests/fixtures/importerror/amodule.py 2011-08-28 20:45:42 +0000 | |||
209 | +++ txaws/server/tests/fixtures/importerror/amodule.py 2012-01-23 01:30:30 +0000 | |||
210 | @@ -1,5 +1,6 @@ | |||
211 | 1 | from txaws.server.method import Method | 1 | from txaws.server.method import Method |
213 | 2 | from txaws.server.tests.fixtures import method | 2 | from txaws.server.tests.fixtures import method |
214 | 3 | |||
215 | 3 | 4 | ||
216 | 4 | @method | 5 | @method |
217 | 5 | class TestMethod(Method): | 6 | class TestMethod(Method): |
218 | 6 | 7 | ||
219 | === modified file 'txaws/server/tests/test_exception.py' | |||
220 | --- txaws/server/tests/test_exception.py 2011-12-01 14:19:12 +0000 | |||
221 | +++ txaws/server/tests/test_exception.py 2012-01-23 01:30:30 +0000 | |||
222 | @@ -54,7 +54,7 @@ | |||
223 | 54 | 54 | ||
224 | 55 | def test_with_unicode_message(self): | 55 | def test_with_unicode_message(self): |
225 | 56 | """ | 56 | """ |
227 | 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. |
228 | 58 | """ | 58 | """ |
229 | 59 | error = APIError(400, code="APIError", message=u"cittá") | 59 | error = APIError(400, code="APIError", message=u"cittá") |
230 | 60 | self.assertEqual(u"cittá", error.message) | 60 | self.assertEqual(u"cittá", error.message) |
231 | 61 | 61 | ||
232 | === modified file 'txaws/server/tests/test_registry.py' | |||
233 | --- txaws/server/tests/test_registry.py 2011-08-28 20:36:04 +0000 | |||
234 | +++ txaws/server/tests/test_registry.py 2012-01-23 01:30:30 +0000 | |||
235 | @@ -98,6 +98,7 @@ | |||
236 | 98 | deal with scanning errors. | 98 | deal with scanning errors. |
237 | 99 | """ | 99 | """ |
238 | 100 | swallowed = [] | 100 | swallowed = [] |
239 | 101 | |||
240 | 101 | def swallow(error): | 102 | def swallow(error): |
241 | 102 | swallowed.append(error) | 103 | swallowed.append(error) |
242 | 103 | 104 | ||
243 | 104 | 105 | ||
244 | === modified file 'txaws/server/tests/test_schema.py' | |||
245 | --- txaws/server/tests/test_schema.py 2012-01-06 01:01:10 +0000 | |||
246 | +++ txaws/server/tests/test_schema.py 2012-01-23 01:30:30 +0000 | |||
247 | @@ -328,7 +328,7 @@ | |||
248 | 328 | """ | 328 | """ |
249 | 329 | parameter = Date("Test") | 329 | parameter = Date("Test") |
250 | 330 | date = datetime(2010, 9, 15, 23, 59, 59, | 330 | date = datetime(2010, 9, 15, 23, 59, 59, |
252 | 331 | tzinfo=tzoffset('UTC', 120*60)) | 331 | tzinfo=tzoffset('UTC', 120 * 60)) |
253 | 332 | self.assertEqual("2010-09-15T21:59:59Z", parameter.format(date)) | 332 | self.assertEqual("2010-09-15T21:59:59Z", parameter.format(date)) |
254 | 333 | 333 | ||
255 | 334 | 334 | ||
256 | 335 | 335 | ||
257 | === modified file 'txaws/testing/base.py' | |||
258 | --- txaws/testing/base.py 2010-06-04 19:00:25 +0000 | |||
259 | +++ txaws/testing/base.py 2012-01-23 01:30:30 +0000 | |||
260 | @@ -24,4 +24,3 @@ | |||
261 | 24 | for key in set(os.environ) - set(self.orig_environ): | 24 | for key in set(os.environ) - set(self.orig_environ): |
262 | 25 | del os.environ[key] | 25 | del os.environ[key] |
263 | 26 | os.environ.update(self.orig_environ) | 26 | os.environ.update(self.orig_environ) |
264 | 27 | |||
265 | 28 | 27 | ||
266 | === modified file 'txaws/testing/payload.py' | |||
267 | --- txaws/testing/payload.py 2011-08-29 19:51:50 +0000 | |||
268 | +++ txaws/testing/payload.py 2012-01-23 01:30:30 +0000 | |||
269 | @@ -22,7 +22,8 @@ | |||
270 | 22 | <code>16</code> | 22 | <code>16</code> |
271 | 23 | <name>running</name> | 23 | <name>running</name> |
272 | 24 | </instanceState> | 24 | </instanceState> |
274 | 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\ |
275 | 26 | </privateDnsName> | ||
276 | 26 | <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName> | 27 | <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName> |
277 | 27 | <instanceType>c1.xlarge</instanceType> | 28 | <instanceType>c1.xlarge</instanceType> |
278 | 28 | <launchTime>2009-04-27T02:23:18.000Z</launchTime> | 29 | <launchTime>2009-04-27T02:23:18.000Z</launchTime> |
279 | @@ -58,7 +59,8 @@ | |||
280 | 58 | <code>16</code> | 59 | <code>16</code> |
281 | 59 | <name>running</name> | 60 | <name>running</name> |
282 | 60 | </instanceState> | 61 | </instanceState> |
284 | 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\ |
285 | 63 | </privateDnsName> | ||
286 | 62 | <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName> | 64 | <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName> |
287 | 63 | <reason/> | 65 | <reason/> |
288 | 64 | <keyName>keyname</keyName> | 66 | <keyName>keyname</keyName> |
289 | @@ -494,7 +496,8 @@ | |||
290 | 494 | <Errors> | 496 | <Errors> |
291 | 495 | <Error> | 497 | <Error> |
292 | 496 | <Code>InvalidGroup.InUse</Code> | 498 | <Code>InvalidGroup.InUse</Code> |
294 | 497 | <Message>Group groupID1:GroupReferredTo is used by groups: groupID2:UsingGroup</Message> | 499 | <Message>Group groupID1:GroupReferredTo is used by groups: \ |
295 | 500 | groupID2:UsingGroup</Message> | ||
296 | 498 | </Error> | 501 | </Error> |
297 | 499 | </Errors> | 502 | </Errors> |
298 | 500 | <RequestID>9a6df05f-9c27-47aa-81d8-6619689210cc</RequestID> | 503 | <RequestID>9a6df05f-9c27-47aa-81d8-6619689210cc</RequestID> |
299 | @@ -503,7 +506,8 @@ | |||
300 | 503 | 506 | ||
301 | 504 | 507 | ||
302 | 505 | sample_authorize_security_group = """\ | 508 | sample_authorize_security_group = """\ |
304 | 506 | <AuthorizeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/%s/"> | 509 | <AuthorizeSecurityGroupIngressResponse\ |
305 | 510 | xmlns="http://ec2.amazonaws.com/doc/%s/"> | ||
306 | 507 | <return>true</return> | 511 | <return>true</return> |
307 | 508 | </AuthorizeSecurityGroupIngressResponse> | 512 | </AuthorizeSecurityGroupIngressResponse> |
308 | 509 | """ % (version.ec2_api,) | 513 | """ % (version.ec2_api,) |
309 | @@ -650,7 +654,8 @@ | |||
310 | 650 | <keySet> | 654 | <keySet> |
311 | 651 | <item> | 655 | <item> |
312 | 652 | <keyName>gsg-keypair</keyName> | 656 | <keyName>gsg-keypair</keyName> |
314 | 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:\ |
315 | 658 | ca:9f:f5:f1:6f</keyFingerprint> | ||
316 | 654 | </item> | 659 | </item> |
317 | 655 | </keySet> | 660 | </keySet> |
318 | 656 | </DescribeKeyPairsResponse> | 661 | </DescribeKeyPairsResponse> |
319 | @@ -663,11 +668,13 @@ | |||
320 | 663 | <keySet> | 668 | <keySet> |
321 | 664 | <item> | 669 | <item> |
322 | 665 | <keyName>gsg-keypair-1</keyName> | 670 | <keyName>gsg-keypair-1</keyName> |
324 | 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:\ |
325 | 672 | ca:9f:f5:f1:6f</keyFingerprint> | ||
326 | 667 | </item> | 673 | </item> |
327 | 668 | <item> | 674 | <item> |
328 | 669 | <keyName>gsg-keypair-2</keyName> | 675 | <keyName>gsg-keypair-2</keyName> |
330 | 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:\ |
331 | 677 | ca:9f:f5:f1:70</keyFingerprint> | ||
332 | 671 | </item> | 678 | </item> |
333 | 672 | </keySet> | 679 | </keySet> |
334 | 673 | </DescribeKeyPairsResponse> | 680 | </DescribeKeyPairsResponse> |
335 | @@ -678,7 +685,8 @@ | |||
336 | 678 | <?xml version="1.0"?> | 685 | <?xml version="1.0"?> |
337 | 679 | <CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/"> | 686 | <CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/"> |
338 | 680 | <keyName>example-key-name</keyName> | 687 | <keyName>example-key-name</keyName> |
340 | 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:\ |
341 | 689 | ca:9f:f5:f1:6f</keyFingerprint> | ||
342 | 682 | <keyMaterial>-----BEGIN RSA PRIVATE KEY----- | 690 | <keyMaterial>-----BEGIN RSA PRIVATE KEY----- |
343 | 683 | MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp | 691 | MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp |
344 | 684 | HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg | 692 | HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg |
345 | @@ -747,7 +755,8 @@ | |||
346 | 747 | <?xml version="1.0"?> | 755 | <?xml version="1.0"?> |
347 | 748 | <ImportKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/"> | 756 | <ImportKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/"> |
348 | 749 | <keyName>example-key-name</keyName> | 757 | <keyName>example-key-name</keyName> |
350 | 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:\ |
351 | 759 | ca:9f:f5:f1:6f</keyFingerprint> | ||
352 | 751 | </ImportKeyPairResponse> | 760 | </ImportKeyPairResponse> |
353 | 752 | """ % (version.ec2_api,) | 761 | """ % (version.ec2_api,) |
354 | 753 | 762 | ||
355 | @@ -837,7 +846,8 @@ | |||
356 | 837 | <Errors> | 846 | <Errors> |
357 | 838 | <Error> | 847 | <Error> |
358 | 839 | <Code>InvalidClientTokenId</Code> | 848 | <Code>InvalidClientTokenId</Code> |
360 | 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\ |
361 | 850 | records.</Message> | ||
362 | 841 | </Error> | 851 | </Error> |
363 | 842 | </Errors> | 852 | </Errors> |
364 | 843 | <RequestID>47bfd77d-78d6-446d-be0d-f7621795dded</RequestID> | 853 | <RequestID>47bfd77d-78d6-446d-be0d-f7621795dded</RequestID> |
365 | @@ -865,7 +875,8 @@ | |||
366 | 865 | <Code>InternalError</Code> | 875 | <Code>InternalError</Code> |
367 | 866 | <Message>We encountered an internal error. Please try again.</Message> | 876 | <Message>We encountered an internal error. Please try again.</Message> |
368 | 867 | <RequestID>A2A7E5395E27DFBB</RequestID> | 877 | <RequestID>A2A7E5395E27DFBB</RequestID> |
370 | 868 | <HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K</HostID> | 878 | <HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K\ |
371 | 879 | </HostID> | ||
372 | 869 | </Error> | 880 | </Error> |
373 | 870 | """ | 881 | """ |
374 | 871 | 882 | ||
375 | @@ -926,7 +937,8 @@ | |||
376 | 926 | 937 | ||
377 | 927 | 938 | ||
378 | 928 | sample_get_bucket_location_result = """\ | 939 | sample_get_bucket_location_result = """\ |
380 | 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\ |
381 | 941 | </LocationConstraint> | ||
382 | 930 | 942 | ||
383 | 931 | """ | 943 | """ |
384 | 932 | sample_request_payment = """\ | 944 | sample_request_payment = """\ |
385 | @@ -940,12 +952,18 @@ | |||
386 | 940 | <?xml version="1.0" encoding="UTF-8"?> | 952 | <?xml version="1.0" encoding="UTF-8"?> |
387 | 941 | <Error> | 953 | <Error> |
388 | 942 | <Code>SignatureDoesNotMatch</Code> | 954 | <Code>SignatureDoesNotMatch</Code> |
391 | 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\ |
392 | 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> |
393 | 957 | <StringToSignBytes>47 45 54 0a 31 42 32 4d 32 59 38 41 73 67 54 70 67 41 6d\ | ||
394 | 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\ | ||
395 | 959 | 30 39 20 32 31 3a 33 33 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes> | ||
396 | 945 | <RequestId>AB9216C8640751B2</RequestId> | 960 | <RequestId>AB9216C8640751B2</RequestId> |
400 | 946 | <HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5</HostId> | 961 | <HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5\ |
401 | 947 | <SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU=</SignatureProvided> | 962 | </HostId> |
402 | 948 | <StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29 GMT\n/</StringToSign> | 963 | <SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU= |
403 | 964 | </SignatureProvided> | ||
404 | 965 | <StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29\ | ||
405 | 966 | GMT\n/</StringToSign> | ||
406 | 949 | <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId> | 967 | <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId> |
407 | 950 | </Error> | 968 | </Error> |
408 | 951 | """ | 969 | """ |
409 | @@ -955,9 +973,11 @@ | |||
410 | 955 | <?xml version="1.0" encoding="UTF-8"?> | 973 | <?xml version="1.0" encoding="UTF-8"?> |
411 | 956 | <Error> | 974 | <Error> |
412 | 957 | <Code>InvalidAccessKeyId</Code> | 975 | <Code>InvalidAccessKeyId</Code> |
414 | 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.\ |
415 | 977 | </Message> | ||
416 | 959 | <RequestId>0223AD81A94821CE</RequestId> | 978 | <RequestId>0223AD81A94821CE</RequestId> |
418 | 960 | <HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE</HostId> | 979 | <HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE\ |
419 | 980 | </HostId> | ||
420 | 961 | <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId> | 981 | <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId> |
421 | 962 | </Error> | 982 | </Error> |
422 | 963 | """ | 983 | """ |
423 | @@ -970,14 +990,16 @@ | |||
424 | 970 | </Owner> | 990 | </Owner> |
425 | 971 | <AccessControlList> | 991 | <AccessControlList> |
426 | 972 | <Grant> | 992 | <Grant> |
428 | 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"\ |
429 | 994 | xsi:type="CanonicalUser"> | ||
430 | 974 | <ID>8a6925ce4adf588a4f21c32aa379004fef</ID> | 995 | <ID>8a6925ce4adf588a4f21c32aa379004fef</ID> |
431 | 975 | <DisplayName>foo@example.net</DisplayName> | 996 | <DisplayName>foo@example.net</DisplayName> |
432 | 976 | </Grantee> | 997 | </Grantee> |
433 | 977 | <Permission>FULL_CONTROL</Permission> | 998 | <Permission>FULL_CONTROL</Permission> |
434 | 978 | </Grant> | 999 | </Grant> |
435 | 979 | <Grant> | 1000 | <Grant> |
437 | 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"\ |
438 | 1002 | xsi:type="CanonicalUser"> | ||
439 | 981 | <ID>8a6925ce4adf588a4f21c32aa37900feed</ID> | 1003 | <ID>8a6925ce4adf588a4f21c32aa37900feed</ID> |
440 | 982 | <DisplayName>bar@example.net</DisplayName> | 1004 | <DisplayName>bar@example.net</DisplayName> |
441 | 983 | </Grantee> | 1005 | </Grantee> |
442 | @@ -985,4 +1007,3 @@ | |||
443 | 985 | </Grant> | 1007 | </Grant> |
444 | 986 | </AccessControlList> | 1008 | </AccessControlList> |
445 | 987 | </AccessControlPolicy>""" | 1009 | </AccessControlPolicy>""" |
446 | 988 | |||
447 | 989 | 1010 | ||
448 | === modified file 'txaws/tests/__init__.py' | |||
449 | --- txaws/tests/__init__.py 2009-08-28 02:32:44 +0000 | |||
450 | +++ txaws/tests/__init__.py 2012-01-23 01:30:30 +0000 | |||
451 | @@ -1,1 +0,0 @@ | |||
452 | 1 | |||
453 | 2 | 0 | ||
454 | === modified file 'txaws/tests/test_util.py' | |||
455 | --- txaws/tests/test_util.py 2009-11-19 16:33:05 +0000 | |||
456 | +++ txaws/tests/test_util.py 2012-01-23 01:30:30 +0000 | |||
457 | @@ -4,6 +4,7 @@ | |||
458 | 4 | 4 | ||
459 | 5 | from txaws.util import hmac_sha1, iso8601time, parse | 5 | from txaws.util import hmac_sha1, iso8601time, parse |
460 | 6 | 6 | ||
461 | 7 | |||
462 | 7 | class MiscellaneousTests(TestCase): | 8 | class MiscellaneousTests(TestCase): |
463 | 8 | 9 | ||
464 | 9 | def test_hmac_sha1(self): | 10 | def test_hmac_sha1(self): |
465 | @@ -20,8 +21,8 @@ | |||
466 | 20 | self.assertEqual(hmac_sha1(key, data), expected) | 21 | self.assertEqual(hmac_sha1(key, data), expected) |
467 | 21 | 22 | ||
468 | 22 | def test_iso8601time(self): | 23 | def test_iso8601time(self): |
471 | 23 | self.assertEqual("2006-07-07T15:04:56Z", iso8601time((2006,7,7,15,4,56, | 24 | self.assertEqual("2006-07-07T15:04:56Z", |
472 | 24 | 0, 0, 0))) | 25 | iso8601time((2006, 7, 7, 15, 4, 56, 0, 0, 0))) |
473 | 25 | 26 | ||
474 | 26 | 27 | ||
475 | 27 | class ParseUrlTestCase(TestCase): | 28 | class ParseUrlTestCase(TestCase): |
Cool, +1!