summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-07-15 09:24:03 -0400
committerChris McDonough <chrism@plope.com>2011-07-15 09:24:03 -0400
commited652182eacf9eb274817905bbfb2041d704f194 (patch)
treecaa174872ed1f40df9f853c376163e1b679fec2e
parent0428eddb22b02611f1f5e250d916cf705f781aee (diff)
downloadpyramid-ed652182eacf9eb274817905bbfb2041d704f194.tar.gz
pyramid-ed652182eacf9eb274817905bbfb2041d704f194.tar.bz2
pyramid-ed652182eacf9eb274817905bbfb2041d704f194.zip
fix Jython test failures
-rw-r--r--pyramid/tests/test_config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pyramid/tests/test_config.py b/pyramid/tests/test_config.py
index 002eab8e8..860653e6c 100644
--- a/pyramid/tests/test_config.py
+++ b/pyramid/tests/test_config.py
@@ -5467,11 +5467,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):