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()
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)
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'}
def setUp(self): TestCaseWithAppContext.setUp(self) self.username = '******' self.password = '******' self.email = '*****@*****.**' self.base_session = \ omicron_server.database.sessions.ContextManagedSession( bind=self.engine )
def setUp(self): TestCaseWithAppContext.setUp(self) self.view.show_schema = mock.MagicMock() self.view.get = mock.MagicMock()
def tearDown(self): del api_server.g.request_id TestCaseWithAppContext.tearDown(self)
def setUp(self): TestCaseWithAppContext.setUp(self) self.token_string = str(uuid1()) self.expiration_date = self.time_to_freeze + timedelta(seconds=1800)
def setUp(self): TestCaseWithAppContext.setUp(self) self.request_id = uuid.uuid1()
def tearDownClass(cls): metadata.drop_all(bind=cls.engine) TestCaseWithAppContext.tearDownClass()
def setUp(self): TestCaseWithAppContext.setUp(self) self.logfile_name = 'logfile' self.mock_conf = Config() self.mock_conf.LOGFILE = self.logfile_name
def setUpClass(cls): TestCaseWithAppContext.setUpClass() cls.view = ResourceWithoutSchema()
def setUp(self): TestCaseWithAppContext.setUp(self) self.project_name = 'test_project' self.project_description = 'This is a description' self.date_created = datetime.utcnow()
def setUp(self): TestCaseWithAppContext.setUp(self) self.command_to_run = 'python ../../__main__.py' self.user = Administrator('root', 'root', '*****@*****.**')