Exemplo n.º 1
0
def test_method_can_be_CONNECT(): assert Method("CONNECT") == u"CONNECT"

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

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