Ticket #16592: fix_unmanaged_models_tests.v1.diff

File fix_unmanaged_models_tests.v1.diff, 1.9 KB (added by Jim Dalton, 13 years ago)
  • tests/modeltests/unmanaged_models/models.py

    diff --git a/tests/modeltests/unmanaged_models/models.py b/tests/modeltests/unmanaged_models/models.py
    index 0c2cf50..c1e3eb6 100644
    a b class A01(models.Model):  
    1212    f_b = models.IntegerField()
    1313
    1414    class Meta:
    15         db_table = 'A01'
     15        db_table = 'a01'
    1616
    1717    def __unicode__(self):
    1818        return self.f_a
    class B01(models.Model):  
    2323    f_b = models.IntegerField()
    2424
    2525    class Meta:
    26         db_table = 'B01'
     26        db_table = 'b01'
    2727        # 'managed' is True by default. This tests we can set it explicitly.
    2828        managed = True
    2929
    class B01(models.Model):  
    3131        return self.f_a
    3232
    3333class C01(models.Model):
    34     mm_a = models.ManyToManyField(A01, db_table='D01')
     34    mm_a = models.ManyToManyField(A01, db_table='d01')
    3535    f_a = models.CharField(max_length=10, db_index=True)
    3636    f_b = models.IntegerField()
    3737
    3838    class Meta:
    39         db_table = 'C01'
     39        db_table = 'c01'
    4040
    4141    def __unicode__(self):
    4242        return self.f_a
    class A02(models.Model):  
    4949    f_a = models.CharField(max_length=10, db_index=True)
    5050
    5151    class Meta:
    52         db_table = 'A01'
     52        db_table = 'a01'
    5353        managed = False
    5454
    5555    def __unicode__(self):
    class A02(models.Model):  
    5757
    5858class B02(models.Model):
    5959    class Meta:
    60         db_table = 'B01'
     60        db_table = 'b01'
    6161        managed = False
    6262
    6363    fk_a = models.ForeignKey(A02)
    class C02(models.Model):  
    7575    f_b = models.IntegerField()
    7676
    7777    class Meta:
    78         db_table = 'C01'
     78        db_table = 'c01'
    7979        managed = False
    8080
    8181    def __unicode__(self):
    class Intermediate(models.Model):  
    8686    c02 = models.ForeignKey(C02, db_column="c01_id")
    8787
    8888    class Meta:
    89         db_table = 'D01'
     89        db_table = 'd01'
    9090        managed = False
    9191
    9292#
Back to Top