Ejemplo n.º 1
0
def test_type_detect_2():
    text_type, stream = RewriteContent._resolve_text_type('js', 'html', BytesIO(b' function() { return 0; }'))
    assert(text_type == 'js')
    assert(stream.read() == b' function() { return 0; }')
Ejemplo n.º 2
0
def test_type_detect_1():
    text_type, stream = RewriteContent._resolve_text_type('js', 'html', BytesIO(b' <html></html>'))
    assert(text_type == 'html')
    assert(stream.read() == b' <html></html>')