======
README
======

This is a second test which makes sure we can tear down the previous server and
start a new one:

  >>> from pprint import pprint
  >>> import pymongo
  >>> conn = pymongo.Connection('localhost', 45017)

Let's test our mongodb stub setup:

  >>> pprint(conn.server_info())
  {u'bits': 32,
   u'debug': False,
   u'gitVersion': u'...',
   u'maxBsonObjectSize': ...,
   u'ok': 1.0,
   u'sysInfo': ...,
   u'version': u'1.8.2'}

  >>> conn.database_names()
  [u'admin', u'local']

setup an index:

  >>> conn.testing.test.collection.ensure_index('dummy')
  u'dummy_1'

add an object:

  >>> _id = conn.testing.test.save({'__name__': u'foo', 'dummy': u'object'})
  >>> _id
  ObjectId('...')

remove them:

  >>> conn.testing.test.remove({'_id': _id})

and check the databsae names again:

  >>> conn.database_names()
  [u'testing', u'admin', u'local']

Let's drop the database:

  >>> conn.drop_database("testing")
  >>> conn.database_names()
  [u'admin', u'local']
