def test__simple_any_type_full(): simple = XMLTypes.SimpleAnyType(any={'test': 0}, mixed={'mix_test': 'val'}, anyAttribute={'any_att': 'anyVal'}, rawValue='0', value=0, instanceType=XMLTypes.Integer) assert simple.any['test'] == 0 assert simple.anyAttribute['any_att'] == 'anyVal' assert simple.mixed['mix_test'] == 'val'
def test__simple_any_type(): simple = XMLTypes.SimpleAnyType() assert simple.rawValue is None assert simple.value is None assert simple.instanceType is None assert simple.mixed == {} assert simple.any == {} assert simple.anyAttribute == {} simple.any = {'test': 0} assert simple.any['test'] == 0 with pytest.raises(BadValueError): simple.any = 4
def test__simple_any_type_bad_arg(): with pytest.raises(AttributeError): XMLTypes.SimpleAnyType(not_arg='test')