From 9da87804c288355757cbf2e40f4a6fee2fd74234 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 28 Mar 2019 07:53:29 +0100 Subject: [PATCH] test_mod => test_mode2 --- test/test_json.py | 11 +++++++++-- tiramisu_json_api/api.py | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/test_json.py b/test/test_json.py index df2c019..5b7924b 100644 --- a/test/test_json.py +++ b/test/test_json.py @@ -31,6 +31,7 @@ def error_to_str(dico): return dico +# config.option().value.dict() def test_dict(): debug = False # debug = True @@ -52,6 +53,7 @@ def test_dict(): assert error_to_str(dico) == error_to_str(config.value.dict()) +# config.option().value.get() def test_get(): debug = False # debug = True @@ -78,6 +80,7 @@ def test_get(): assert value == config.option(key).value.get() +# config.option().owner.get() def test_owner(): debug = False # debug = True @@ -106,6 +109,7 @@ def test_owner(): assert value == {'null': config.option(key).owner.get()} +# config.option().property.get() def test_prop(): debug = False # debug = True @@ -140,10 +144,13 @@ def test_prop(): assert value == props +# config.option().property.get(True) def test_prop2(): debug = False # debug = True for filename in list_data(): + if debug: + print(filename) with open(filename, 'r') as fh: json = loads(fh.read()) config = Config(json) @@ -186,7 +193,7 @@ def test_info(): def test_mod(): debug = False - debug = True + # debug = True i = 0 while True: i += 1 @@ -227,7 +234,7 @@ def test_mod(): assert dico1 == config.value.dict() -def test_mod(): +def test_mod2(): debug = False # debug = True i = 0 diff --git a/tiramisu_json_api/api.py b/tiramisu_json_api/api.py index 0ca89f5..2a2ee3e 100644 --- a/tiramisu_json_api/api.py +++ b/tiramisu_json_api/api.py @@ -244,7 +244,7 @@ class TiramisuOptionValue(_Value): self._display_warnings(self.path, value, self.schema['type'], self.schema['name']) return value if self.index is not None: - raise APIError(_('index must be only with a follower option, not for "{}"').format(self.path)) + raise APIError(_('index must only be set with a follower option, not for "{}"').format(self.path)) value = self.config.get_value(self.path) self._display_warnings(self.path, value, self.schema['type'], self.schema['name']) return value