mirror of
https://github.com/ansible/awx.git
synced 2026-04-05 18:19:21 -02:30
Handle a change in the error message for BooleanField
related encode/django-rest-framework#5881
This commit is contained in:
@@ -33,7 +33,7 @@ class TestSAMLOrgAttrField():
|
|||||||
|
|
||||||
@pytest.mark.parametrize("data, expected", [
|
@pytest.mark.parametrize("data, expected", [
|
||||||
({'remove': 'blah', 'saml_attr': 'foobar'},
|
({'remove': 'blah', 'saml_attr': 'foobar'},
|
||||||
ValidationError('"blah" is not a valid boolean.')),
|
ValidationError('Must be a valid boolean.')),
|
||||||
({'remove': True, 'saml_attr': False},
|
({'remove': True, 'saml_attr': False},
|
||||||
ValidationError('Not a valid string.')),
|
ValidationError('Not a valid string.')),
|
||||||
({'remove': True, 'saml_attr': False, 'foo': 'bar', 'gig': 'ity'},
|
({'remove': True, 'saml_attr': False, 'foo': 'bar', 'gig': 'ity'},
|
||||||
@@ -41,7 +41,7 @@ class TestSAMLOrgAttrField():
|
|||||||
({'remove_admins': True, 'saml_admin_attr': False},
|
({'remove_admins': True, 'saml_admin_attr': False},
|
||||||
ValidationError('Not a valid string.')),
|
ValidationError('Not a valid string.')),
|
||||||
({'remove_admins': 'blah', 'saml_admin_attr': 'foobar'},
|
({'remove_admins': 'blah', 'saml_admin_attr': 'foobar'},
|
||||||
ValidationError('"blah" is not a valid boolean.')),
|
ValidationError('Must be a valid boolean.')),
|
||||||
])
|
])
|
||||||
def test_internal_value_invalid(self, data, expected):
|
def test_internal_value_invalid(self, data, expected):
|
||||||
field = SAMLOrgAttrField()
|
field = SAMLOrgAttrField()
|
||||||
|
|||||||
Reference in New Issue
Block a user