import pytest


@pytest.fixture
def bounding_geometry():
    from django.contrib.gis import geos
    return geos.GEOSGeometry(
        '{"type":"MultiPolygon","coordinates":[[[[8.815935552120209,47.222220486817676],[8.815935552120209,47.22402752311505],[8.818982541561127,47.22402752311505],[8.818982541561127,47.222220486817676],[8.815935552120209,47.222220486817676]]]]}'
    )

@@ -8,16 +8,144 @@
 pytest%0A%0A
+from osmaxx.conversion_api import formats%0Afrom osmaxx.excerptexport.models import Excerpt, ExtractionOrder, Export, OutputFile%0A%0A
 %0A@pytest
@@ -501,8 +501,1122 @@
 '%0A    )%0A
+%0A%0A@pytest.fixture%0Adef excerpt(user, bounding_geometry, db):%0A    return Excerpt.objects.create(%0A        name='Neverland', is_active=True, is_public=True, owner=user, bounding_geometry=bounding_geometry%0A    )%0A%0A%0A@pytest.fixture%0Adef extraction_order(excerpt, user, db):%0A    extraction_order = ExtractionOrder.objects.create(excerpt=excerpt, orderer=user)%0A    extraction_order.extraction_configuration = %7B%7D%0A    return extraction_order%0A%0A%0A@pytest.fixture(%0A    params=%5Bformats.FGDB, formats.SHAPEFILE, formats.GPKG, formats.SPATIALITE, formats.GARMIN%5D%0A)%0Adef export(request, extraction_order):%0A    return Export.objects.create(%0A        extraction_order=extraction_order,%0A        file_format=request.param%0A    )%0A%0A%0A@pytest.fixture%0Adef output_file_with_file(export):%0A    output_file = OutputFile.objects.create(mime_type='test/plain', export=export,%0A                                            content_type='text', file_extension='zip')%0A    from django.core.files.base import ContentFile%0A    name = 'download_file.zip'%0A    file = ContentFile(b%22some content%22)%0A    output_file.file.save(name, file)%0A    return output_file, name%0A

add fixtures