Ticket #7789: 7789_tests.diff
File 7789_tests.diff, 1.1 KB (added by , 16 years ago) |
---|
-
regressiontests/model_regress/models.py
32 32 class Event(models.Model): 33 33 when = models.DateTimeField() 34 34 35 # #7789 36 class Julian(models.Model): 37 name = models.CharField(max_length=20, unique=True) 38 39 class Julian2(models.Model): 40 slug = models.SlugField(unique=True) 41 35 42 __test__ = {'API_TESTS': """ 36 43 (NOTE: Part of the regression test here is merely parsing the model 37 44 declaration. The verbose_name, in particular, did not always work.) … … 87 94 datetime.datetime(2000, 1, 1, 13, 1, 1) 88 95 >>> e.get_previous_by_when().when 89 96 datetime.datetime(2000, 1, 1, 6, 1, 1) 97 98 99 # #7789 MySQL case-insensitive unique constraints 100 >>> Julian.objects.get_or_create(name='Julian')[1] 101 True 102 >>> Julian.objects.get_or_create(name='julian')[1] 103 True 104 >>> Julian2.objects.get_or_create(slug='Julian')[1] 105 True 106 >>> Julian2.objects.get_or_create(slug='julian')[1] 107 True 90 108 """ 91 109 }