Did I find the right examples for you? yes no

All Samples(39)  |  Call(39)  |  Derive(0)  |  Import(0)
Drop a database.

Raises :class:`TypeError` if `name_or_database` is not an instance of
:class:`basestring` (:class:`str` in python 3) or Database.

:Parameters:
  - `name_or_database`: the name of a database to drop, or a
    :class:`~pymongo.database.Database` instance representing the
    database to drop

src/m/o/mongoengine-HEAD/benchmark.py   mongoengine(Download)
def cprofile_main():
    from pymongo import Connection
    connection = Connection()
    connection.drop_database('timeit_test')
    connection.disconnect()

src/m/o/MongoHub-HEAD/Resources/mongodb.py   MongoHub(Download)
    def drop_database(self, host, port, dbname):
        try:
            c = MongoConnection(host=host, port=int(port), pool_size=1)
            c.drop_database(dbname)
        except Exception, err:

src/m/o/mongopersist-0.8.4/src/mongopersist/performance.py   mongopersist(Download)
        conflict_handler_factory=conflict.ResolvingSerialConflictHandler)
    if options.reload:
        conn.drop_database('performance')
        dm.root['people'] = people = People()
 

src/m/o/mongopersist-HEAD/src/mongopersist/performance.py   mongopersist(Download)
            conflict_handler_factory=conflict.ResolvingSerialConflictHandler)
        if options.reload:
            conn.drop_database('performance')
            dm.root['people'] = people = People()
 

src/t/h/thumbor-HEAD/vows/mongo_storage_vows.py   thumbor(Download)
    def teardown(self):
        CONNECTION.drop_database('thumbor')
 
 
@Vows.batch

src/c/o/conceptdb-HEAD/conceptdb/__init__.py   conceptdb(Download)
    conn = pymongo.Connection(host=host)
    conn.admin.authenticate(username, password)
    conn.drop_database(dbname)
 
class JSONScrubber(json.JSONEncoder):

src/m/e/mediagoblin-HEAD/destroy_environment.py   mediagoblin(Download)
 
conn = pymongo.Connection()
conn.drop_database('mediagoblin')
 
os.popen('rm -rf user_dev/media')

src/s/t/stattr-HEAD/test.py   stattr(Download)
        del dbconf['_id']
        del dbadmin['_id']
        conn.drop_database(dbname)
        self.assertEquals(dbconf, ourconf,
                          'The build_database method is broken. Somehow, '\
            testRequest = c.get('/conf.json?callback=blah')
            result = statserv.server.get_conf()
            conn.drop_database(dbname)
            self.assertEquals(statserv.server.make_response('blah', expected),
                              result,
                                                     {'users': otherusers})
            actual = statserv.server.get_users()
            conn.drop_database('test_db')
            self.assertEquals(actual, expected,
                              'The get_users method returned something other '\
            expected = statserv.server.make_response('blah', user)
            actual = statserv.server.get_user()
            conn.drop_database('test_db')
            self.assertEquals(actual, expected,
                              'The get_user method returned something other '\
                              'didn\'t expect. Expected: `%s`, '\
                              'actual: `%s`.' % (expected, actual))
            conn.drop_database('test_db')
 
    def tearDown(self):

src/p/u/pulp-HEAD/playpen/mongodb/test_dbrefs.py   pulp(Download)
    def tearDown(self):
        connection = Connection()
        connection.drop_database("_test_dbrefs")
 
    def testRemoveWithRef(self):

src/p/u/pulp-HEAD/playpen/mongodb/data-test.py   pulp(Download)
    repos.remove()
    consumers.remove()
    connection.drop_database(db)
    print "Cleaned all old data"
    exit(0)

  1 | 2 | 3  Next