コード例 #1
0
    def setUp(self):
        TestCaseWithAppContext.setUp(self)
        self.response = jsonify({'message': 'test'})
        self.request_id = str(uuid.uuid1())

        api_server.g.request_id = self.request_id
        api_server.g.session = mock.MagicMock()
コード例 #2
0
    def setUp(self):
        TestCaseWithAppContext.setUp(self)
        self.response = jsonify({'message': 'test'})
        self.request_id = str(uuid.uuid1())

        api_server.g.request_id = self.request_id
        api_server.g.session = mock.MagicMock()
コード例 #3
0
 def setUp(self):
     """
     Create an engine for a SQLlite in-memory DB, and create a
     :class:`ContextManagedSession` to test on
     """
     TestCaseWithAppContext.setUp(self)
     self.engine = create_engine('sqlite:///')
     self.base_session = ContextManagedSession(bind=self.engine)
コード例 #4
0
    def setUp(self):
        TestCaseWithAppContext.setUp(self)
        api_server.database_session = ContextManagedSession(bind=test_engine)
        self.app = api_server.app
        self.client = self.app.test_client()
        self.request_method = self.client.get
        self.url = '/'

        self.headers = {'content-type': 'application/json'}
コード例 #5
0
    def setUp(self):
        TestCaseWithAppContext.setUp(self)
        api_server.database_session = ContextManagedSession(bind=test_engine)
        self.app = api_server.app
        self.client = self.app.test_client()
        self.request_method = self.client.get
        self.url = '/'

        self.headers = {'content-type': 'application/json'}
コード例 #6
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.username = '******'
     self.password = '******'
     self.email = '*****@*****.**'
     self.base_session = \
         omicron_server.database.sessions.ContextManagedSession(
             bind=self.engine
         )
コード例 #7
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.view.show_schema = mock.MagicMock()
     self.view.get = mock.MagicMock()
コード例 #8
0
 def tearDown(self):
     del api_server.g.request_id
     TestCaseWithAppContext.tearDown(self)
コード例 #9
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.token_string = str(uuid1())
     self.expiration_date = self.time_to_freeze + timedelta(seconds=1800)
コード例 #10
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.request_id = uuid.uuid1()
コード例 #11
0
 def tearDown(self):
     del api_server.g.request_id
     TestCaseWithAppContext.tearDown(self)
コード例 #12
0
 def tearDownClass(cls):
     metadata.drop_all(bind=cls.engine)
     TestCaseWithAppContext.tearDownClass()
コード例 #13
0
    def setUp(self):
        TestCaseWithAppContext.setUp(self)
        self.logfile_name = 'logfile'

        self.mock_conf = Config()
        self.mock_conf.LOGFILE = self.logfile_name
コード例 #14
0
 def setUpClass(cls):
     TestCaseWithAppContext.setUpClass()
     cls.view = ResourceWithoutSchema()
コード例 #15
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.project_name = 'test_project'
     self.project_description = 'This is a description'
     self.date_created = datetime.utcnow()
コード例 #16
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.project_name = 'test_project'
     self.project_description = 'This is a description'
     self.date_created = datetime.utcnow()
コード例 #17
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.command_to_run = 'python ../../__main__.py'
     self.user = Administrator('root', 'root', '*****@*****.**')
コード例 #18
0
    def setUp(self):
        TestCaseWithAppContext.setUp(self)
        self.logfile_name = 'logfile'

        self.mock_conf = Config()
        self.mock_conf.LOGFILE = self.logfile_name
コード例 #19
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.command_to_run = 'python ../../__main__.py'
     self.user = Administrator('root', 'root', '*****@*****.**')
コード例 #20
0
 def setUp(self):
     TestCaseWithAppContext.setUp(self)
     self.request_id = uuid.uuid1()