class LoaderTest(unittest.TestCase): def setUp( self ): test_dir = os.path.join( os.path.dirname( __file__ ), "test1" ) self._loader = Loader(test_dir) def test_find_versions(self): v001 = VersionNumber('v001') v002 = VersionNumber('v002') v07 = VersionNumber('v0-7') self._loader._find_files() self.assertEqual([v07, v001, v002], self._loader._find_versions()) def test_load_migration_module(self): self._loader._load_migration_module('v001') m = self._loader._modules self.assertEqual( 1, len(m) ) self.assertEqual( types.ModuleType, type(m[0]) )
class LoaderTest(unittest.TestCase): def setUp(self): test_dir = os.path.join(os.path.dirname(__file__), "test1") self._loader = Loader(test_dir) def test_find_versions(self): v001 = VersionNumber('v001') v002 = VersionNumber('v002') v07 = VersionNumber('v0-7') self._loader._find_files() self.assertEqual([v07, v001, v002], self._loader._find_versions()) def test_load_migration_module(self): self._loader._load_migration_module('v001') m = self._loader._modules self.assertEqual(1, len(m)) self.assertEqual(types.ModuleType, type(m[0]))
def setUp( self ): test_dir = os.path.join( os.path.dirname( __file__ ), "test1" ) self._loader = Loader(test_dir)
def setUp(self): test_dir = os.path.join(os.path.dirname(__file__), "test1") self._loader = Loader(test_dir)