Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
 def run(self):
     load_models()
     print('args = ', self.args)
     create_all(self.args.db_echo)
Exemplo n.º 4
0
 def run(self):
     load_models()
     create_all(self.args.db_echo)
Exemplo n.º 5
0
 def run(self):
     load_models()
     print('args = ', self.args)
     create_all(self.args.db_echo)