def delete_collection(db_name, collection_name, host='localhost', port=27017):
    """Almost exclusively for testing."""
    client = MongoClient("mongodb://%s:%d" % (host, port))
    client[db_name].drop_collection(collection_name)
def delete_collection ( db_name , collection_name , host = 'localhost' , port = 27017 ) : client = MongoClient ( "mongodb://%s:%d" % ( host , port ) ) client [ db_name ] . drop_collection ( collection_name )
Almost exclusively for testing.