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