Duncan McGreggor has proposed merging
lp:~dreamhosters/txaws/920302-python2.5-compat into lp:txaws.
Requested reviews:
txAWS Technical List (txaws-tech)
Related bugs:
Bug #920302 in txAWS: "Some unit tests failing for Python2.5"
https://bugs.launchpad.net/txaws/+bug/920302
For more details, see:
https://code.launchpad.net/~dreamhosters/txaws/920302-python2.5-compat/+merge/90360
This branch takes care of the Python2.5 errors that were preventing the test
suite from completing (some of the fixes involved test skips).
--
https://code.launchpad.net/~dreamhosters/txaws/920302-python2.5-compat/+merge/90360
Your team txAWS Technical List is requested to review the proposed merge of
lp:~dreamhosters/txaws/920302-python2.5-compat into lp:txaws.
=== modified file 'Makefile'
--- Makefile 2012-01-27 00:10:28 +
+++ Makefile 2012-01-27 02:22:23 +
@@ -23,6 +23,11 @@
@python setup.py sdist
+check-testcase-names:
+ @echo "Checking for (possibly) badly named test cases..."
+ @find ./txaws|xargs grep Test|grep class|grep -v 'TestCase('
+
+
virtual-dir-setup: VERSION ?= 2.7
virtual-dir-setup:
-@test -d .venv-$(VERSION) || virtualenv -p $(PYBIN)$(VERSION) .venv-$(VERSION)
@@ -82,6 +87,7 @@
-@test -e "`which python2.5`" && VERSION=2.5 make virtual-check
-@test -e "`which python2.6`" && VERSION=2.6 make virtual-check
-@test -e "`which python2.7`" && VERSION=2.7 make virtual-check
+ make check-testcase-names
virtual-uninstall: VERSION ?= 2.7
=== modified file 'txaws/client/discover/tests/test_command.py'
--- txaws/client/discover/tests/test_command.py 2012-01-12 14:41:59 +
+++ txaws/client/discover/tests/test_command.py 2012-01-27 02:22:23 +
@@ -20,7 +20,7 @@
self.url = url
-class CommandTest(TXAWSTestCase):
+class CommandTestCase(TXAWSTestCase):
def prepare_command(self, response, status, action, parameters={},
get_page=None, error=None):
=== modified file 'txaws/client/discover/tests/test_entry_point.py'
--- txaws/client/discover/tests/test_entry_point.py 2010-06-04 22:35:23 +
+++ txaws/client/discover/tests/test_entry_point.py 2012-01-27 02:22:23 +
@@ -12,7 +12,7 @@
from txaws.testing.base import TXAWSTestCase
-class ParseOptionsTest(TXAWSTestCase):
+class ParseOptionsTestCase(TXAWSTestCase):
def test_parse_options(self):
"""
@@ -165,7 +165,7 @@
"--action", "action", "--help"])
-class GetCommandTest(TXAWSTestCase):
+class GetCommandTestCase(TXAWSTestCase):
def test_get_command_without_arguments(self):
"""An L{OptionError} is raised if no arguments are provided."""
@@ -223,7 +223,7 @@
self.assertEqual({"Region.Name.0": "us-west-1"}, command.parameters)
-class MainTest(TXAWSTestCase):
+class MainTestCase(TXAWSTestCase):
def test_usage_message(self):
"""
=== modified file 'txaws/client/gui/tests/test_gtk.py'
--- txaws/client/gui/tests/test_gtk.py 2012-01-23 01:02:16 +
+++ txaws/client/gui/tests/test_gtk.py 2012-01-27 02:22:23 +
@@ -4,7 +4,7 @@
from twisted.trial.unittest import TestCase
-class UITests(TestCase):
+class UITestCase(TestCase):
pass
# Really need some, but UI testing hurts my brain.
=== modified file 'txaws/s3/tests/test_acls.py'
--- txaws/s3/tests/test_acls.py 2012-01-26 23:05:01 +
+++ txaws/s3/tests/test_acls.py 2012-01-27 02:22:23 +
@@ -4,7 +4,7 @@
from txaws.s3 import acls
-class ACLTests(TestCase):
+class ACLTestCase(TestCase):
def test_owner_to_xml(self):
owner = acls.Owner(id='8a6925ce4adf588a4f21c32aa379004fef',
=== modified file 'txaws/s3/tests/test_client.py'
--- txaws/s3/tests/test_client.py 2012-01-27 01:19:27 +
+++ txaws/s3/tests/test_client.py 2012-01-27 02:22:23 +
@@ -309,79 +309,6 @@
d = s3.get_bucket_lifecycle("mybucket")
return d.addCallback(check_results)
-def test_get_bucket_website_config(self):
-"""
-L{S3Client.get_bucket_website_config} creates a L{Query} to get a
-bucket's website configurtion. It parses the returned
-C{WebsiteConfiguration} XML document and returns a C{Deferred} that
-fires with the bucket's region.
-"""
-
-class StubQuery(client.Query):
-
-def __init__(query, action, creds, endpoint, bucket=None,
- object_name=None):
-super(StubQuery, query).__init__(action=action, creds=creds,
- bucket=bucket,
- object_name=object_name)
-self.assertEquals(action, "GET")
-self.assertEqual(creds.access_key, "foo")
-self.assertEqual(creds.secret_key, "bar")
-self.assertEqual(query.bucket, "mybucket")
-self.assertEqual(query.object_name, "?website")
-self.assertEqual(query.data, "")
-self.assertEq