def force_reset_config(): """ Resets the values for the CRITsConfig class by dropping the database collection and then saving a new default CRITsConfig. """ print "Resetting CRITs configuration settings." CRITsConfig.drop_collection(); crits_config = CRITsConfig(); crits_config.save();
def clean_db(): """ Clean up the DB after testing. """ src = SourceAccess.objects(name=TSRC).first() if src: src.delete() user = CRITsUser.objects(username=TUSER_NAME).first() if user: user.delete() TestObject.drop_collection() TestSourceObject.drop_collection() CRITsConfig.drop_collection()
def clean_db(): """ Clean up the DB after testing. """ src = SourceAccess.objects(name=TSRC).first() if src: src.delete() user = CRITsUser.objects(username=TUSER_NAME).first() if user: user.delete() TestObject.drop_collection() TestSourceObject.drop_collection() CRITsConfig.drop_collection()