Merge lp:~zooko/txaws/742947-skip-tests-relying-on-epsilon into lp:txaws

Proposed by Zooko Wilcox-O'Hearn
Status: Merged
Merged at revision: 72
Proposed branch: lp:~zooko/txaws/742947-skip-tests-relying-on-epsilon
Merge into: lp:txaws
Diff against target: 74 lines (+19/-2)
2 files modified
txaws/s3/tests/test_client.py (+11/-1)
txaws/tests/test_service.py (+8/-1)
To merge this branch: bzr merge lp:~zooko/txaws/742947-skip-tests-relying-on-epsilon
Reviewer Review Type Date Requested Status
Jamu Kakar Approve
Review via email: mp+54946@code.launchpad.net

Description of the change

See #742947

(Sorry, I haven't figured out the work-flow to submit patches on launchpad.)

To post a comment you must log in.
Revision history for this message
Jamu Kakar (jkakar) wrote :

Zooko, thanks for the fix!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'txaws/s3/tests/test_client.py'
2--- txaws/s3/tests/test_client.py 2009-11-23 00:55:44 +0000
3+++ txaws/s3/tests/test_client.py 2011-03-26 05:44:27 +0000
4@@ -1,7 +1,12 @@
5 from twisted.internet.defer import succeed
6
7 from txaws.credentials import AWSCredentials
8-from txaws.s3 import client
9+try:
10+ from txaws.s3 import client
11+except ImportError:
12+ s3clientSkip = "S3Client couldn't be imported (perhaps because epsilon, on which it depends, isn't present)"
13+else:
14+ s3clientSkip = None
15 from txaws.service import AWSServiceEndpoint
16 from txaws.testing import payload
17 from txaws.testing.base import TXAWSTestCase
18@@ -54,6 +59,8 @@
19 url_context.get_url(),
20 "http://mydocs.localhost/notes.txt")
21
22+URLContextTestCase.skip = s3clientSkip
23+
24
25 class BucketURLContextTestCase(TXAWSTestCase):
26
27@@ -64,6 +71,7 @@
28 self.assertEquals(url_context.get_host(), "s3.amazonaws.com")
29 self.assertEquals(url_context.get_path(), "/mystuff")
30
31+BucketURLContextTestCase.skip = s3clientSkip
32
33 class S3ClientTestCase(TXAWSTestCase):
34
35@@ -297,6 +305,7 @@
36 s3 = client.S3Client(creds, query_factory=StubQuery)
37 return s3.delete_object("mybucket", "objectname")
38
39+S3ClientTestCase.skip = s3clientSkip
40
41 class QueryTestCase(TXAWSTestCase):
42
43@@ -469,6 +478,7 @@
44 headers["Authorization"],
45 "AWS fookeyid:TESTINGSIG=")
46
47+QueryTestCase.skip = s3clientSkip
48
49 class MiscellaneousTests(TXAWSTestCase):
50
51
52=== modified file 'txaws/tests/test_service.py'
53--- txaws/tests/test_service.py 2009-11-27 21:00:13 +0000
54+++ txaws/tests/test_service.py 2011-03-26 05:44:27 +0000
55@@ -3,7 +3,13 @@
56
57 from txaws.credentials import AWSCredentials
58 from txaws.ec2.client import EC2Client
59-from txaws.s3.client import S3Client
60+try:
61+ from txaws.s3.client import S3Client
62+except ImportError:
63+ s3clientSkip = "S3Client couldn't be imported (perhaps because epsilon, on which it depends, isn't present)"
64+else:
65+ s3clientSkip = None
66+
67 from txaws.service import (AWSServiceEndpoint, AWSServiceRegion,
68 EC2_ENDPOINT_EU, EC2_ENDPOINT_US, REGION_EU)
69 from txaws.testing.base import TXAWSTestCase
70@@ -158,3 +164,4 @@
71 self.assertEquals(original_client, None)
72 self.assertTrue(isinstance(new_client, S3Client))
73 self.assertNotEquals(original_client, new_client)
74+ test_get_s3_client_with_empty_cache.skip = s3clientSkip

Subscribers

People subscribed via source and target branches