Esempio n. 1
0
def test_parse_content_range_emptystr():
    from webob.descriptors import parse_content_range
    assert parse_content_range(' ') == None
Esempio n. 2
0
def test_parse_content_range_stop():
    from webob.byterange import ContentRange
    from webob.descriptors import parse_content_range
    val = parse_content_range("bytes 0-499/1234")
    assert val.stop == ContentRange.parse("bytes 0-499/1234").stop
Esempio n. 3
0
def test_parse_content_range_none():
    from webob.descriptors import parse_content_range
    assert parse_content_range(None) == None
Esempio n. 4
0
def test_parse_content_range_start():
    from webob.byterange import ContentRange
    from webob.descriptors import parse_content_range
    val = parse_content_range("bytes 0-499/1234")
    eq_(val.start, ContentRange.parse("bytes 0-499/1234").start)
Esempio n. 5
0
def test_parse_content_range_length():
    from webob.byterange import ContentRange
    from webob.descriptors import parse_content_range
    val = parse_content_range("bytes 0-499/1234")
    eq_(val.length, ContentRange.parse("bytes 0-499/1234").length)
Esempio n. 6
0
def test_parse_content_range_emptystr():
    from webob.descriptors import parse_content_range
    eq_(parse_content_range(' '), None)
Esempio n. 7
0
def test_parse_content_range_none():
    from webob.descriptors import parse_content_range
    eq_(parse_content_range(None), None)