Very first version of the migration checker and its tests

This commit is contained in:
david_wobrock committed 2017-04-01 20:18:56 +02:00
commit 870b9a7a26
2 files changed
+149

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import unittest
import checker
class CheckerTest(unittest.TestCase):
def test_split_migration_path(self):
input_path = 'apps/the_app/migrations/0001_stuff.py'
app, mig = checker.split_migration_path(input_path)
self.assertEqual(app, 'the_app')
self.assertEqual(mig, '0001_stuff')
def test_split_migration_path_2(self):
input_path = 'the_app/migrations/0001_stuff.py'
app, mig = checker.split_migration_path(input_path)
self.assertEqual(app, 'the_app')
self.assertEqual(mig, '0001_stuff')