Skip to content
Snippets Groups Projects
Commit ced96cc6 authored by Wannes Rombouts's avatar Wannes Rombouts
Browse files

Added default_encoding to tests, so that we can switch json/xml easy.

parent 23d0faba
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
import utils
from utils import APIRequest
import sys
......@@ -358,6 +359,8 @@ def _test_layers(target, map_name):
def test_scenario():
# utils.default_encoding = "xml"
target = "http://localhost:8080"
map_name = "tests"
......
......@@ -31,6 +31,8 @@ import json
import sys
default_encoding = "json"
def deduce_content_type(type):
if type == "json":
return "application/json"
......@@ -38,7 +40,7 @@ def deduce_content_type(type):
return "application/xml"
def APIRequest(method, url, data=None, encode="json", decode="json", content_type=None, expected_type=None,
def APIRequest(method, url, data=None, encode=default_encoding, decode=default_encoding, content_type=None, expected_type=None,
get_response=False):
if encode == "json":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment