def setUp(self): TestCaseWithDatabase.setUp(self) self.username = '******' self.password = '******' self.email = '*****@*****.**' self.object_to_write = User(self.username, self.password, self.email) self.session = ContextManagedSession(bind=conf.DATABASE_ENGINE)
def setUp(self): TestCaseWithDatabase.setUp(self) self._clear_test_user(database_session) with database_session() as session: session.add(User(self.username, self.password, self.email))