def test_serialize_if_range_datetime(): import datetime from webob.descriptors import serialize_if_range UTC = GMT() val = serialize_if_range(datetime.datetime(1994, 11, 15, 8, 12, 31, tzinfo=UTC)) eq_(val, "Tue, 15 Nov 1994 08:12:31 GMT")
def test_serialize_if_range_datetime(): import datetime from webob.descriptors import serialize_if_range UTC = GMT() val = serialize_if_range( datetime.datetime(1994, 11, 15, 8, 12, 31, tzinfo=UTC)) eq_(val, "Tue, 15 Nov 1994 08:12:31 GMT")
def test_serialize_if_range_other(): from webob.descriptors import serialize_if_range val = serialize_if_range(123456) assert val == "123456"
def test_serialize_if_range_unicode(): from webob.descriptors import serialize_if_range val = serialize_if_range("avalue") assert val == "avalue"
def test_serialize_if_range_other(): from webob.descriptors import serialize_if_range val = serialize_if_range(123456) assert val == '123456'
def test_serialize_if_range_other(): from webob.descriptors import serialize_if_range val = serialize_if_range(123456) eq_(val, '123456')
def test_serialize_if_range_string(): from webob.descriptors import serialize_if_range val = serialize_if_range("avalue") eq_(val, "avalue")
def test_serialize_if_range_unicode(): from webob.descriptors import serialize_if_range val = serialize_if_range(u"avalue") eq_(val, u"avalue")