1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Start adding operations that work and tests for them

This commit is contained in:
Andrew Godwin
2013-05-29 17:47:10 +01:00
parent 264f8650e3
commit d0ecefc2c9
16 changed files with 221 additions and 56 deletions

View File

@@ -1,11 +1,8 @@
from django.test import TransactionTestCase, TestCase
from django.db import connection
from django.test import TestCase
from django.db.migrations.graph import MigrationGraph, CircularDependencyError
from django.db.migrations.loader import MigrationLoader
from django.db.migrations.recorder import MigrationRecorder
class GraphTests(TransactionTestCase):
class GraphTests(TestCase):
"""
Tests the digraph structure.
"""
@@ -117,20 +114,3 @@ class GraphTests(TransactionTestCase):
CircularDependencyError,
graph.forwards_plan, ("app_a", "0003"),
)
class LoaderTests(TransactionTestCase):
"""
Tests the disk and database loader.
"""
def test_load(self):
"""
Makes sure the loader can load the migrations for the test apps.
"""
migration_loader = MigrationLoader(connection)
graph = migration_loader.build_graph()
self.assertEqual(
graph.forwards_plan(("migrations", "0002_second")),
[("migrations", "0001_initial"), ("migrations", "0002_second")],
)