From ec3032abd5b5800b7a5485f6ea59be85202e8a75 Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Tue, 3 Aug 2021 19:30:51 +0200 Subject: [PATCH] Move layer diff_lines to variable --- tests/static_publications/__init__.py | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/tests/static_publications/__init__.py b/tests/static_publications/__init__.py index dc2375edf..59197ec4c 100644 --- a/tests/static_publications/__init__.py +++ b/tests/static_publications/__init__.py @@ -17,6 +17,21 @@ USERS = {OWNER, OWNER2, NOT_OWNER, } HEADERS = {user: process_client.get_authz_headers(user) for user in USERS} +MICKA_XML_LAYER_DIFF_LINES = [ + {'plus_line': '+ m-81c0debe-b2ea-4829-9b16-581083b29907\n', + 'minus_line_starts_with': '- m', + 'minus_line_ends_with': '\n', + }, + {'plus_line': '+ 2007-05-25\n', + 'minus_line_starts_with': '- ', + 'minus_line_ends_with': '\n', + }, + {'plus_line': '+ 2019-12-07\n', + 'minus_line_starts_with': '- ', + 'minus_line_ends_with': '\n', + }, +] + PUBLICATIONS = { ################################################################################ # LAYERS @@ -428,20 +443,7 @@ 'file_type': settings.FILE_TYPE_VECTOR, 'style_type': 'sld', 'micka_xml': {'filled_template': 'test_tools/data/micka/rest_test_filled_template.xml', - 'diff_lines': [ - {'plus_line': '+ m-81c0debe-b2ea-4829-9b16-581083b29907\n', - 'minus_line_starts_with': '- m', - 'minus_line_ends_with': '\n', - }, - {'plus_line': '+ 2007-05-25\n', - 'minus_line_starts_with': '- ', - 'minus_line_ends_with': '\n', - }, - {'plus_line': '+ 2019-12-07\n', - 'minus_line_starts_with': '- ', - 'minus_line_ends_with': '\n', - }, - ], + 'diff_lines': MICKA_XML_LAYER_DIFF_LINES, 'diff_lines_len': 29, }, },