Commit 3db66b1d authored by Tim Graham's avatar Tim Graham
Browse files

Updated syncdb -> migrate in tests.

parent 8f7f8bf6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ class DumpDataAssertMixin(object):
class FixtureLoadingTests(DumpDataAssertMixin, TestCase):

    def test_initial_data(self):
        # syncdb introduces 1 initial data object from initial_data.json.
        # migrate introduces 1 initial data object from initial_data.json.
        self.assertQuerysetEqual(Book.objects.all(), [
            '<Book: Achieving self-awareness of Python programs>'
        ])
+3 −3
Original line number Diff line number Diff line
@@ -30,12 +30,12 @@ class TestNoInitialDataLoading(TransactionTestCase):

    available_apps = ['fixtures_model_package']

    def test_syncdb(self):
    def test_migrate(self):
        with transaction.atomic():
            Book.objects.all().delete()

            management.call_command(
                'syncdb',
                'migrate',
                verbosity=0,
                load_initial_data=False
            )
@@ -64,7 +64,7 @@ class TestNoInitialDataLoading(TransactionTestCase):
class FixtureTestCase(TestCase):
    def test_initial_data(self):
        "Fixtures can load initial data into models defined in packages"
        # syncdb introduces 1 initial data object from initial_data.json
        # migrate introduces 1 initial data object from initial_data.json
        self.assertQuerysetEqual(
            Book.objects.all(), [
                'Achieving self-awareness of Python programs'
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class InitialSQLTests(TestCase):

    def test_custom_sql(self):
        """
        Simulate the custom SQL loading by syncdb.
        Simulate the custom SQL loading by migrate.
        """
        connection = connections[DEFAULT_DB_ALIAS]
        custom_sql = custom_sql_for_model(Simple, no_style(), connection)
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ class Worksheet(models.Model):
# Regression for #11226 -- A model with the same name that another one to
# which it has a m2m relation. This shouldn't cause a name clash between
# the automatically created m2m intermediary table FK field names when
# running syncdb
# running migrate
class User(models.Model):
    name = models.CharField(max_length=30)
    friends = models.ManyToManyField(auth.User)
Loading