Exemplo n.º 1
0
def test_detect_zip_false():
    sample = io.open('data/table.csv', mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == False
Exemplo n.º 2
0
def test_detect_zip_xlsx():
    sample = io.open('data/table.xlsx', mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == True
Exemplo n.º 3
0
def test_detect_zip_true():
    sample = io.open('data/special/table.csv.zip', mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == True
Exemplo n.º 4
0
def test_detect_zip_xlsx():
    sample = io.open('data/table.xlsx',
                     mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == True
Exemplo n.º 5
0
def test_detect_zip_false():
    sample = io.open('data/table.csv',
                     mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == False
Exemplo n.º 6
0
def test_detect_zip_true():
    sample = io.open('data/special/table.csv.zip',
                     mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == True
Exemplo n.º 7
0
def test_detect_zip_ods():
    sample = io.open('data/table.ods', mode='rb').read(config.DEFAULT_BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == True