Exemplo n.º 1
0
def test_flare_too_large(zip_contents):
    my_flare = Flare(paths=[zip_contents])
    my_flare.MAX_UPLOAD_SIZE = 1
    my_flare.create_archive()

    assert not my_flare._validate_size()
    with mock.patch('requests.post', return_value=requests_ok):
        assert not my_flare.submit()

    my_flare.cleanup()
    assert not os.path.exists(my_flare.get_archive_path())