示例#1
0
文件: runtest.py 项目: hadoop2012/eva
    def run(self, argv=[]):

        if not self.args.ignore_env_check:
            if not self.is_development:
                print('runtest should use a test settings.py!')
                sys.exit(1)

        from eva.orm import create_all, drop_all

        try:
            create_all(echo=self.args.db_echo)
            runner = unittest.TextTestRunner(verbosity=2)

            # run model TestSuite
            suite = load_model_tests()
            runner.run(suite)

            # run api TestSuite
            suite = load_api_tests()
            runner.run(suite)

        finally:
            drop_all(echo=self.args.db_echo)
示例#2
0
文件: runtest.py 项目: hadoop2012/eva
    def run(self, argv=[]):

        if not self.args.ignore_env_check:
            if not self.is_development:
                print('runtest should use a test settings.py!')
                sys.exit(1)

        from eva.orm import create_all, drop_all

        try:
            create_all(echo=self.args.db_echo)
            runner = unittest.TextTestRunner(verbosity=2)

            # run model TestSuite
            suite = load_model_tests()
            runner.run(suite)

            # run api TestSuite
            suite = load_api_tests()
            runner.run(suite)

        finally:
            drop_all(echo=self.args.db_echo)
示例#3
0
文件: syncdb.py 项目: hadoop2012/eva
 def run(self):
     load_models()
     print('args = ', self.args)
     create_all(self.args.db_echo)
示例#4
0
 def run(self):
     load_models()
     create_all(self.args.db_echo)
示例#5
0
 def run(self):
     load_models()
     print('args = ', self.args)
     create_all(self.args.db_echo)