Commits

Luke Plant committed 57e03a2

In tests, changed 'southtest' to 'fakeapp' for consistency.

The mismatch between the apps true applabel 'fakeapp' and the string
'southtest' (which is presumably an historical artefact) causes problems
writing tests.

Comments (0)

Files changed (4)

south/tests/fakeapp/migrations/0001_spam.py

     
     def forwards(self):
         # Model 'Spam'
-        db.create_table("southtest_spam", (
+        db.create_table("fakeapp_spam", (
             ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
             ('weight', models.FloatField()),
             ('expires', models.DateTimeField()),
         ))
     
     def backwards(self):
-        db.delete_table("southtest_spam")
+        db.delete_table("fakeapp_spam")
 

south/tests/fakeapp/migrations/0002_eggs.py

     
     def forwards(self):
         
-        Spam = db.mock_model(model_name='Spam', db_table='southtest_spam', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
+        Spam = db.mock_model(model_name='Spam', db_table='fakeapp_spam', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
         
-        db.create_table("southtest_eggs", (
+        db.create_table("fakeapp_eggs", (
             ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
             ('size', models.FloatField()),
             ('quantity', models.IntegerField()),
     
     def backwards(self):
         
-        db.delete_table("southtest_eggs")
+        db.delete_table("fakeapp_eggs")
 

south/tests/fakeapp/migrations/0003_alter_spam.py

     
     def forwards(self):
         
-        db.alter_column("southtest_spam", 'weight', models.FloatField(null=True))
+        db.alter_column("fakeapp_spam", 'weight', models.FloatField(null=True))
     
     def backwards(self):
         
-        db.alter_column("southtest_spam", 'weight', models.FloatField())
+        db.alter_column("fakeapp_spam", 'weight', models.FloatField())
 
     models = {
         "fakeapp.bug135": {

south/tests/logic.py

             
             try:
                 if db.backend_name == "pyodbc":
-                    cursor.execute("SET IDENTITY_INSERT southtest_spam ON;")
-                cursor.execute("INSERT INTO southtest_spam (id, weight, expires, name) VALUES (100, NULL, %s, 'whatever');" % now_func)
+                    cursor.execute("SET IDENTITY_INSERT fakeapp_spam ON;")
+                cursor.execute("INSERT INTO fakeapp_spam (id, weight, expires, name) VALUES (100, NULL, %s, 'whatever');" % now_func)
             except:
                 if eat_exception:
                     transaction.rollback()
                 else:
                     raise
             else:
-                cursor.execute("DELETE FROM southtest_spam")
+                cursor.execute("DELETE FROM fakeapp_spam")
                 transaction.commit()
                 return True
 
 
     def test_get_app_label(self):
         self.assertEqual(
-            "southtest",
-            get_app_label(self.create_fake_app("southtest.models")),
+            "fakeapp",
+            get_app_label(self.create_fake_app("fakeapp.models")),
         )
         self.assertEqual(
             "baz",