Ejemplo n.º 1
0
 def parser(filename, allow_serie=True, mode=None):
     migration_file = os.path.join(request.fspath.dirname,
                                   'examples', filename)
     config = Config(migration_file,
                     'test',
                     allow_serie=allow_serie,
                     mode=mode)
     migration_parser = YamlParser.parse_from_file(config.migration_file)
     return migration_parser, config
Ejemplo n.º 2
0
 def parser(filename, allow_serie=True, mode=None):
     migration_file = os.path.join(request.fspath.dirname,
                                   'examples', filename)
     config = Config(migration_file,
                     'test',
                     allow_serie=allow_serie,
                     mode=mode)
     migration_parser = YamlParser.parse_from_file(config.migration_file)
     return migration_parser, config
Ejemplo n.º 3
0
 def runner(filename, allow_serie=True, mode=None, db_versions=None):
     migration_file = os.path.join(request.fspath.dirname,
                                   'examples', filename)
     config = Config(migration_file,
                     'test',
                     allow_serie=allow_serie,
                     mode=mode)
     migration_parser = YamlParser.parse_from_file(config.migration_file)
     migration = migration_parser.parse()
     table = mock.MagicMock(spec=MigrationTable)
     table.versions.return_value = db_versions or []
     database = mock.MagicMock(spec=Database)
     return Runner(config, migration, database, table)
Ejemplo n.º 4
0
 def runner(filename, allow_serie=True, mode=None, db_versions=None):
     migration_file = os.path.join(request.fspath.dirname,
                                   'examples', filename)
     config = Config(migration_file,
                     'test',
                     allow_serie=allow_serie,
                     mode=mode)
     migration_parser = YamlParser.parse_from_file(config.migration_file)
     migration = migration_parser.parse()
     table = mock.MagicMock(spec=MigrationTable)
     table.versions.return_value = db_versions or []
     database = mock.MagicMock(spec=Database)
     return Runner(config, migration, database, table)