コード例 #1
0
def test_method_can_be_CONNECT(): assert Method("CONNECT") == u"CONNECT"

def test_method_can_be_big():
コード例 #2
0
def test_method_can_be_DELETE():  assert Method("DELETE")  == u"DELETE"
def test_method_can_be_TRACE():   assert Method("TRACE")   == u"TRACE"
コード例 #3
0
def test_method_can_be_TRACE():   assert Method("TRACE")   == u"TRACE"
def test_method_can_be_CONNECT(): assert Method("CONNECT") == u"CONNECT"
コード例 #4
0
def test_method_can_be_POST():    assert Method("POST")    == u"POST"
def test_method_can_be_PUT():     assert Method("PUT")     == u"PUT"
コード例 #5
0
def test_method_can_be_PUT():     assert Method("PUT")     == u"PUT"
def test_method_can_be_DELETE():  assert Method("DELETE")  == u"DELETE"
コード例 #6
0
def test_method_works():
    method = Method("GET")
    assert method == u"GET", method
コード例 #7
0
def test_method_can_be_HEAD():    assert Method("HEAD")    == u"HEAD"
def test_method_can_be_POST():    assert Method("POST")    == u"POST"
コード例 #8
0
def test_method_cant_have_more_attributes():
    method = Method("GET")
    assert_raises(AttributeError, setattr, method, "foo", "bar")
コード例 #9
0
def test_method_can_be_OPTIONS(): assert Method("OPTIONS") == u"OPTIONS"
def test_method_can_be_GET():     assert Method("GET")     == u"GET"
コード例 #10
0
def test_method_raw_works():
    method = Method("GET")
    assert method.raw == "GET", method.raw
コード例 #11
0
def test_method_raw_is_bytestring():
    method = Method("GET")
    assert isinstance(method.raw, str), method.raw
コード例 #12
0
def test_method_is_basestring_instance():
    method = Method("GET")
    assert isinstance(method, basestring), method
コード例 #13
0
def test_method_is_unicode_instance():
    method = Method("GET")
    assert isinstance(method, unicode), method
コード例 #14
0
def test_method_is_unicode_subclass():
    method = Method("GET")
    assert issubclass(method.__class__, unicode), method.__class__
コード例 #15
0
def test_method_can_be_big():
    big = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz--"
    assert Method(big) == big
コード例 #16
0
def test_method_can_be_GET():     assert Method("GET")     == u"GET"
def test_method_can_be_HEAD():    assert Method("HEAD")    == u"HEAD"
コード例 #17
0
def test_method_can_be_valid_perl():
    assert Method("!#$%&'*+-.^_`|~") == u"!#$%&'*+-.^_`|~"
コード例 #18
0
def test_method_no_chr_33(): assert Method(chr(33)) == '!'

# SEPARATORS
def test_method_no_chr_40(): the501(40) # (