fix invalid_formaddrecord test because field is now a choice not an integer
This commit is contained in:
parent
42db5cedee
commit
e477a23ba4
|
@ -29,7 +29,7 @@ class FormTests(TestCase):
|
||||||
testform_2 = forms.FormAddRecord(form_data)
|
testform_2 = forms.FormAddRecord(form_data)
|
||||||
self.assertTrue(testform_2.is_valid())
|
self.assertTrue(testform_2.is_valid())
|
||||||
|
|
||||||
def test_InValid_FormAddRecord(self):
|
def test_Invalid_FormAddRecord(self):
|
||||||
""" Pass FormAddRecord invalid values, compare error response dicts."""
|
""" Pass FormAddRecord invalid values, compare error response dicts."""
|
||||||
form_data = {"dns_server":"server1",
|
form_data = {"dns_server":"server1",
|
||||||
"record_name":"record1$$$",
|
"record_name":"record1$$$",
|
||||||
|
@ -41,8 +41,8 @@ class FormTests(TestCase):
|
||||||
"create_reverse":True}
|
"create_reverse":True}
|
||||||
|
|
||||||
expected_form_errors = {"record_data": [u"Enter a valid IPv4 or IPv6 address."],
|
expected_form_errors = {"record_data": [u"Enter a valid IPv4 or IPv6 address."],
|
||||||
"record_name": [u"Enter a valid value."],
|
"record_name": [u"Enter a valid value."],
|
||||||
"ttl": [u"Enter a whole number."]}
|
"ttl": [u'Select a valid choice. A is not one of the available choices.']}
|
||||||
testform_2 = forms.FormAddRecord(form_data)
|
testform_2 = forms.FormAddRecord(form_data)
|
||||||
testform_2.is_valid()
|
testform_2.is_valid()
|
||||||
self.assertFalse(testform_2.is_valid())
|
self.assertFalse(testform_2.is_valid())
|
||||||
|
|
Loading…
Reference in New Issue