示例#1
0
 def setup_database(self):
     super(OAuth1Tests, self).setup_database()
     package_name = "%s.%s.migrate_repo" % (contrib.__name__, self.EXTENSION_NAME)
     package = importutils.import_module(package_name)
     self.repo_path = os.path.abspath(os.path.dirname(package.__file__))
     migration.db_version_control(version=None, repo_path=self.repo_path)
     migration.db_sync(version=None, repo_path=self.repo_path)
 def setup_database(self):
     super(FederationTests, self).setup_database()
     package_name = "%s.%s.migrate_repo" % (contrib.__name__,
                                            self.EXTENSION_NAME)
     package = importutils.import_module(package_name)
     self.repo_path = os.path.abspath(os.path.dirname(package.__file__))
     migration.db_version_control(version=None, repo_path=self.repo_path)
     migration.db_sync(version=None, repo_path=self.repo_path)
示例#3
0
 def setup_database(self):
     self.conf_files = super(TestExtensionCase, self).config_files()
     self.conf_files.append(
         tests.dirs.tests('test_associate_project_endpoint_extension.conf'))
     super(TestExtensionCase, self).setup_database()
     package_name = '.'.join((contrib.__name__, self.EXTENSION_NAME))
     package = importutils.import_module(package_name)
     migration.db_version_control(package=package)
     migration.db_sync(package=package)
示例#4
0
 def setup_database(self):
     self.conf_files = super(TestExtensionCase, self).config_files()
     self.conf_files.append(
         tests.dirs.tests('test_associate_project_endpoint_extension.conf'))
     super(TestExtensionCase, self).setup_database()
     package_name = "%s.%s.migrate_repo" % (contrib.__name__,
                                            self.EXTENSION_NAME)
     package = importutils.import_module(package_name)
     self.repo_path = os.path.abspath(os.path.dirname(package.__file__))
     migration.db_version_control(version=None, repo_path=self.repo_path)
     migration.db_sync(version=None, repo_path=self.repo_path)
 def setup_database(self):
     self.conf_files = super(TestExtensionCase, self).config_files()
     self.conf_files.append(
         tests.dirs.tests('test_associate_project_endpoint_extension.conf'))
     super(TestExtensionCase, self).setup_database()
     package_name = "%s.%s.migrate_repo" % (contrib.__name__,
                                            self.EXTENSION_NAME)
     package = importutils.import_module(package_name)
     self.repo_path = os.path.abspath(
         os.path.dirname(package.__file__))
     migration.db_version_control(version=None, repo_path=self.repo_path)
     migration.db_sync(version=None, repo_path=self.repo_path)
示例#6
0
 def main():
     version = CONF.command.version
     extension = CONF.command.extension
     if not extension:
         migration.db_sync(version=version)
     else:
         package_name = "%s.%s.migrate_repo" % (contrib.__name__, extension)
         try:
             package = importutils.import_module(package_name)
             repo_path = os.path.abspath(os.path.dirname(package.__file__))
         except ImportError:
             print(_("This extension does not provide migrations."))
             exit(0)
         try:
             # Register the repo with the version control API
             # If it already knows about the repo, it will throw
             # an exception that we can safely ignore
             migration.db_version_control(version=None, repo_path=repo_path)
         except exceptions.DatabaseAlreadyControlledError:
             pass
         migration.db_sync(version=None, repo_path=repo_path)
示例#7
0
 def main():
     version = CONF.command.version
     extension = CONF.command.extension
     if not extension:
         migration.db_sync(version=version)
     else:
         package_name = "%s.%s.migrate_repo" % (contrib.__name__, extension)
         try:
             package = importutils.import_module(package_name)
             repo_path = os.path.abspath(os.path.dirname(package.__file__))
         except ImportError:
             print(_("This extension does not provide migrations."))
             exit(0)
         try:
             # Register the repo with the version control API
             # If it already knows about the repo, it will throw
             # an exception that we can safely ignore
             migration.db_version_control(version=None, repo_path=repo_path)
         except exceptions.DatabaseAlreadyControlledError:
             pass
         migration.db_sync(version=None, repo_path=repo_path)
示例#8
0
 def setup_database(self):
     super(FederationTests, self).setup_database()
     package_name = '.'.join((contrib.__name__, self.EXTENSION_NAME))
     package = importutils.import_module(package_name)
     migration.db_version_control(package=package)
     migration.db_sync(package=package)