misc: remove compatibility with old export format (#68554)
This commit is contained in:
parent
5ddfa0503a
commit
bf62d743a5
|
@ -87,11 +87,6 @@ def export_site(pages=True, cartography=True, pwa=True, assets=True, payment=Tru
|
|||
|
||||
|
||||
def import_site(data, if_empty=False, clean=False, request=None):
|
||||
if isinstance(data, list):
|
||||
# old export form with a list of pages, convert it to new dictionary
|
||||
# format.
|
||||
data = {'pages': data}
|
||||
|
||||
if 'combo.apps.lingo' in settings.INSTALLED_APPS:
|
||||
from combo.apps.lingo.models import PaymentBackend, Regie
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ def test_import_export(app, some_data):
|
|||
assert Page.objects.count() == 3
|
||||
assert TextCell.objects.all().count() == 1
|
||||
|
||||
import_site(data=[], clean=True)
|
||||
import_site(data={}, clean=True)
|
||||
tempdir = tempfile.mkdtemp('chrono-test')
|
||||
empty_output = get_output_of_command('export_site', output=os.path.join(tempdir, 't.json'))
|
||||
assert os.path.exists(os.path.join(tempdir, 't.json'))
|
||||
|
@ -139,13 +139,6 @@ def test_import_export_with_nested_parents():
|
|||
assert two.parent.slug == 'two'
|
||||
|
||||
|
||||
def test_backward_compatibility_import(app, some_data):
|
||||
old_export = Page.export_all_for_json()
|
||||
Page.objects.all().delete()
|
||||
import_site(data=old_export)
|
||||
assert Page.objects.count() == 3
|
||||
|
||||
|
||||
def test_import_export_map_layers(app, some_map_layers):
|
||||
output = get_output_of_command('export_site')
|
||||
assert len(json.loads(output)['map-layers']) == 2
|
||||
|
|
Loading…
Reference in New Issue