Пример #1
0
 def tearDown(self):
     """Regular tear down method"""
     session = DBSession()
     Bmark.query.delete()
     Tag.query.delete()
     session.execute(bmarks_tags.delete())
     session.flush()
     transaction.commit()
Пример #2
0
 def tearDown(self):
     """Regular tear down method"""
     session = DBSession()
     Bmark.query.delete()
     Tag.query.delete()
     session.execute(bmarks_tags.delete())
     session.flush()
     transaction.commit()
Пример #3
0
 def tearDown(self):
     """We need to empty the bmarks table on each run"""
     testing.tearDown()
     session = DBSession
     Bmark.query.delete()
     Tag.query.delete()
     session.execute(bmarks_tags.delete())
     session.flush()
     transaction.commit()
Пример #4
0
 def tearDown(self):
     """Tear down each test"""
     testing.tearDown()
     session = DBSession()
     Bmark.query.delete()
     Tag.query.delete()
     session.execute(bmarks_tags.delete())
     session.flush()
     transaction.commit()
Пример #5
0
 def tearDown(self):
     """Tear down each test"""
     testing.tearDown()
     session = DBSession()
     Bmark.query.delete()
     Tag.query.delete()
     session.execute(bmarks_tags.delete())
     session.flush()
     transaction.commit()
Пример #6
0
 def tearDown(self):
     """We need to empty the bmarks table on each run"""
     testing.tearDown()
     session = DBSession()
     Bmark.query.delete()
     Tag.query.delete()
     session.execute(bmarks_tags.delete())
     session.flush()
     transaction.commit()
Пример #7
0
def empty_db():
    """On teardown, remove all the db stuff"""

    Bmark.query.delete()
    Readable.query.delete()
    # we can't remove the toread tag we have from our commands
    Tag.query.filter(Tag.name != 'toread').delete()
    Hashed.query.delete()

    DBSession.execute(bmarks_tags.delete())
    DBSession.flush()
    transaction.commit()
Пример #8
0
    def tearDown(self):
        """We need to empty the bmarks table on each run"""
        testing.tearDown()

        if BOOKIE_TEST_INI == 'test.ini':
            SqliteBmarkFT.query.delete()
        Bmark.query.delete()
        Tag.query.delete()
        Hashed.query.delete()

        DBSession.execute(bmarks_tags.delete())
        DBSession.flush()
        transaction.commit()
Пример #9
0
def empty_db():
    """On teardown, remove all the db stuff"""

    if BOOKIE_TEST_INI == 'test.ini':
        SqliteBmarkFT.query.delete()
    Bmark.query.delete()
    # we can't remove the toread tag we have from our commands
    Tag.query.filter(Tag.name != 'toread').delete()
    Hashed.query.delete()

    DBSession.execute(bmarks_tags.delete())
    DBSession.flush()
    transaction.commit()
Пример #10
0
    def tearDown(self):
        """We need to empty the bmarks table on each run"""
        testing.tearDown()

        # DBSession.execute("TRUNCATE bmarks;")
        # DBSession.execute("TRUNCATE fulltext;")
        # DBSession.execute("TRUNCATE tags;")
        # DBSession.execute("TRUNCATE bmarks_tags;")
        SqliteModel.query.delete()
        Bmark.query.delete()
        Tag.query.delete()
        DBSession.execute(bmarks_tags.delete())
        DBSession.flush()
        transaction.commit()
Пример #11
0
    def tearDown(self):
        """We need to empty the bmarks table on each run"""
        testing.tearDown()

        # DBSession.execute("TRUNCATE bmarks;")
        # DBSession.execute("TRUNCATE fulltext;")
        # DBSession.execute("TRUNCATE tags;")
        # DBSession.execute("TRUNCATE bmarks_tags;")
        SqliteModel.query.delete()
        Bmark.query.delete()
        Tag.query.delete()
        DBSession.execute(bmarks_tags.delete())
        DBSession.flush()
        transaction.commit()
Пример #12
0
def empty_db():
    """On teardown, remove all the db stuff"""
    DBSession.execute(bmarks_tags.delete())
    Readable.query.delete()
    Bmark.query.delete()
    Tag.query.delete()
    # we can't remove the toread tag we have from our commands
    Hashed.query.delete()
    ImportQueue.query.delete()

    DBSession.flush()
    transaction.commit()

    # Clear the fulltext index as well.
    _reset_index()
Пример #13
0
def empty_db():
    """On teardown, remove all the db stuff"""
    DBSession.execute(bmarks_tags.delete())
    Readable.query.delete()
    Bmark.query.delete()
    StatBookmark.query.delete()
    Tag.query.delete()
    # we can't remove the toread tag we have from our commands
    Hashed.query.delete()
    ImportQueue.query.delete()
    # Delete the users not admin in the system.
    Activation.query.delete()
    User.query.filter(User.username != 'admin').delete()

    AppLog.query.delete()
    DBSession.flush()
    transaction.commit()

    # Clear the fulltext index as well.
    _reset_index()
Пример #14
0
def empty_db():
    """On teardown, remove all the db stuff"""
    DBSession.execute(bmarks_tags.delete())
    Readable.query.delete()
    Bmark.query.delete()
    StatBookmark.query.delete()
    Tag.query.delete()
    # we can't remove the toread tag we have from our commands
    Hashed.query.delete()
    ImportQueue.query.delete()
    # Delete the users not admin in the system.
    Activation.query.delete()
    User.query.filter(User.username != u'admin').delete()

    AppLog.query.delete()
    DBSession.flush()
    transaction.commit()

    # Clear the fulltext index as well.
    _reset_index()