def test_log_repr_dict_keys_full(self): from spyne.model import AnyDict from spyne.util.web import log_repr t = AnyDict(logged='keys-full') assert log_repr({1: 1, 2: 2, 3: 3}, t) == "{1: (...), 2: (...), 3: (...)}" assert log_repr([1, 2, 3], t) == "[1, 2, 3]"
def test_log_repr_dict_values_full(self): from spyne.model import AnyDict from spyne.util.web import log_repr t = AnyDict(logged='values-full') assert log_repr({1: 1, 2: 2, 3: 3}, t) == "{(...): 1, (...): 2, (...): 3}" assert log_repr([1, 2, 3], t) == "[1, 2, 3]"
def test_log_repr_dict_values(self): from spyne.model import AnyDict from spyne.util.web import log_repr t = AnyDict(logged='values') assert log_repr({1: 1}, t) == "{(...): 1}" assert log_repr([1], t) == "[1]"
def test_anydict_customization(self): from spyne.model import json assert isinstance(AnyDict.customize(store_as='json').Attributes.store_as, json)
def test_anydict_customization(self): from spyne.model import json assert isinstance( AnyDict.customize(store_as='json').Attributes.store_as, json)