Chris McDonough
2011-07-15 ed652182eacf9eb274817905bbfb2041d704f194
fix Jython test failures
1 files modified
9 ■■■■ changed files
pyramid/tests/test_config.py 9 ●●●● patch | view | raw | blame | history
pyramid/tests/test_config.py
@@ -5467,11 +5467,16 @@
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):