Ticket #12027: 12027_patch_test.diff

File 12027_patch_test.diff, 820 bytes (added by shaz, 11 years ago)

Test patch for ticket

  • tests/validation/tests.py

    diff --git a/tests/validation/tests.py b/tests/validation/tests.py
    index b571e0c..7de5647 100644
    a b class BaseModelValidationTests(ValidationTestCase):  
    4747        mtv = ModelToValidate(number=10, name='Some Name', email='valid@email.com')
    4848        self.assertEqual(None, mtv.full_clean())
    4949
     50    def test_trailing_dot_on_email_passes(self):
     51        #regression test for #12027
     52        mtv = ModelToValidate(number=10, name="Some Name", email="should@pass.com.")
     53        self.assertEqual(None, mtv.full_clean())
     54
    5055    def test_wrong_url_value_raises_error(self):
    5156        mtv = ModelToValidate(number=10, name='Some Name', url='not a url')
    5257        self.assertFieldFailsValidationWithMessage(mtv.full_clean, 'url', ['Enter a valid URL.'])
Back to Top