def test_detect_zip_false():
    sample = io.open('data/table.csv', mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == False
def test_detect_zip_xlsx():
    sample = io.open('data/table.xlsx', mode='rb').read(config.BYTES_SAMPLE_SIZE)
    assert helpers.detect_zip(sample) == True
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
Esempio 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
Esempio 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
Esempio 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
Esempio 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