Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()