コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    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))
コード例 #4
0
    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))