Exemplo n.º 1
0
 def test_no_databases(self):
     """
     Migration checks should not consider unapplied migrations if there is
     no database configured.
     """
     errors = check_migrations()
     self.assertEqual(errors, [])
Exemplo n.º 2
0
 def test_no_databases(self):
     """
     Migration checks should not consider unapplied migrations if there is
     no database configured.
     """
     errors = check_migrations()
     self.assertEqual(errors, [])
Exemplo n.º 3
0
 def test_unapplied(self):
     """
     check_migrations should return a warning when there are unapplied migrations.
     """
     expected = [
         checks.Warning(
             "You have unapplied migrations; "
             "your app may not work properly until they are applied.",
             hint="Run 'python manage.py migrate' to apply them.",
         )
     ]
     errors = check_migrations()
     self.assertEqual(errors, expected)
Exemplo n.º 4
0
 def test_unapplied(self):
     """
     check_migrations should return a warning when there are unapplied migrations.
     """
     expected = [
         checks.Warning(
             "You have unapplied migrations; "
             "your app may not work properly until they are applied.",
             hint="Run 'python manage.py migrate' to apply them.",
         )
     ]
     errors = check_migrations()
     self.assertEqual(errors, expected)
Exemplo n.º 5
0
 def test_no_unapplied(self):
     """
     No warning should be issued if all migrations have been applied.
     """
     errors = check_migrations()
     self.assertEqual(errors, [])
Exemplo n.º 6
0
 def test_no_unapplied(self):
     """
     No warning should be issued if all migrations have been applied.
     """
     errors = check_migrations()
     self.assertEqual(errors, [])