Ticket #26900: 26900-test.diff

File 26900-test.diff, 567 bytes (added by Tim Graham, 8 years ago)

A regression test for Django's test suite

  • tests/model_fields/test_filefield.py

    diff --git a/tests/model_fields/test_filefield.py b/tests/model_fields/test_filefield.py
    index 3b0ef57..b87c62c 100644
    a b class FileFieldTests(TestCase):  
    5050        d = Document.objects.create(myfile='something.txt')
    5151        d.refresh_from_db()
    5252        self.assertIs(d.myfile.instance, d)
     53
     54    def test_defer(self):
     55        d = Document.objects.create(myfile='something.txt')
     56        self.assertEqual(Document.objects.defer('myfile')[0].myfile, 'something.txt')
Back to Top