Example #1
0
 def test_internal_value_valid(self, data):
     field = SAMLTeamAttrField()
     res = field.to_internal_value(data)
     assert res == data
Example #2
0
 def test_internal_value_invalid(self, data, expected):
     field = SAMLTeamAttrField()
     with pytest.raises(type(expected)) as e:
         field.to_internal_value(data)
     assert str(e.value) == str(expected)
 def test_internal_value_invalid(self, data, expected):
     field = SAMLTeamAttrField()
     with pytest.raises(ValidationError) as e:
         field.to_internal_value(data)
     assert e.value.detail == expected