Ticket #23594: 23594-test.diff

File 23594-test.diff, 1.0 KB (added by Tim Graham, 7 years ago)
  • tests/forms_tests/tests/test_util.py

    diff --git a/tests/forms_tests/tests/test_util.py b/tests/forms_tests/tests/test_util.py
    index 5f0b549..90406fc 100644
    a b  
    11# -*- coding: utf-8 -*-
    22from __future__ import unicode_literals
    33
     4from copy import deepcopy
     5
    46from django.core.exceptions import ValidationError
    57from django.forms.utils import flatatt, ErrorDict, ErrorList
    68from django.test import TestCase
    class FormsUtilTestCase(TestCase): 
    6668                         '<ul class="errorlist"><li>nameExample of link: &lt;a href=&quot;http://www.example.com/&quot;&gt;example&lt;/a&gt;</li></ul>')
    6769        self.assertHTMLEqual(str(ErrorDict({'name': mark_safe(example)})),
    6870                         '<ul class="errorlist"><li>nameExample of link: <a href="http://www.example.com/">example</a></li></ul>')
     71
     72    def test_error_dict_deepcopy(self):
     73        e = ErrorDict()
     74        e['__all__'] = ErrorList(['message'])
     75
     76        e_copy = deepcopy(e)
     77        self.assertEqual(e, e_copy)
Back to Top