diff options
| author | Chris McDonough <chrism@plope.com> | 2011-07-15 09:25:26 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-07-15 09:25:26 -0400 |
| commit | 4f3d77a45ec0e022fefed6b12f4e585f91f32e50 (patch) | |
| tree | 332746e31b47bce1f70bd701bd004696f025045e | |
| parent | c38aaf545681738e841351c74f7c687b488fe6c6 (diff) | |
| parent | 4edda0d6d875ee0e7bc0375e4b314d78b1261f0e (diff) | |
| download | pyramid-4f3d77a45ec0e022fefed6b12f4e585f91f32e50.tar.gz pyramid-4f3d77a45ec0e022fefed6b12f4e585f91f32e50.tar.bz2 pyramid-4f3d77a45ec0e022fefed6b12f4e585f91f32e50.zip | |
Merge branch 'master' into mmerickel-feature.scripting
| -rw-r--r-- | pyramid/tests/test_config.py | 9 | ||||
| -rw-r--r-- | pyramid/tests/test_router.py | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/pyramid/tests/test_config.py b/pyramid/tests/test_config.py index dd5c90bf7..489134f00 100644 --- a/pyramid/tests/test_config.py +++ b/pyramid/tests/test_config.py @@ -5489,11 +5489,16 @@ class DummyRegistry(object): def parse_httpdate(s): import datetime - return datetime.datetime.strptime(s, "%a, %d %b %Y %H:%M:%S %Z") + # cannot use %Z, must use literal GMT; Jython honors timezone + # but CPython does not + return datetime.datetime.strptime(s, "%a, %d %b %Y %H:%M:%S GMT") def assert_similar_datetime(one, two): for attr in ('year', 'month', 'day', 'hour', 'minute'): - assert(getattr(one, attr) == getattr(two, attr)) + one_attr = getattr(one, attr) + two_attr = getattr(two, attr) + if not one_attr == two_attr: + raise AssertionError('%r != %r in %s' % (one_attr, two_attr, attr)) from pyramid.interfaces import IResponse class DummyResponse(object): diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py index 6cd86901e..55eed50f5 100644 --- a/pyramid/tests/test_router.py +++ b/pyramid/tests/test_router.py @@ -418,7 +418,7 @@ class TestRouter(unittest.TestCase): request.response.a = 1 raise KeyError def exc_view(context, request): - self.failIf(hasattr(request.response, 'a')) + self.assertFalse(hasattr(request.response, 'a')) request.response.body = 'OK' return request.response environ = self._makeEnviron() |
