예제 #1
0
 def test_nonpy_and_nonnumber_are_ignored(self):
   db = MigrationDb()
   db.populate_migrations_from_ls(["1_foo.py", "1_bar.pyc", "4-ohhi.py", "-9_kitty.py", "1_bar.html", ".", ".boo", "..", "123.py.gz", "hello_45.py", "__init__.py", "___init__.pyc", "hello.py", "hello.pyc"])
   self.assert_equal([
        "1_foo",
     ], db.list()
   )
예제 #2
0
 def test_dup_warnings(self):
   db = MigrationDb()
   db.warn = WarningsMocker()
   db.populate_migrations_from_ls([
     "17_foo.py",
     "017_bar.py",
     "0018_foo.py",
     "00018_foo.py",
     "180_hello.py",
   ])
   self.assert_equal(
     [
     u'There are multiple migrations with the same number 17: 017_bar, 17_foo',
     u'There are multiple migrations with the same number 18: 00018_foo, 0018_foo'
     ],
     db.warn.warnings
   )