'Ensure connect() defaults to the right database name if
the URI and the database_name don\'t explicitly specify it.'

def test_connect_uri_default_db(self):

    connect(host='mongodb://localhost/')
    conn = get_connection()
    self.assertTrue(isinstance(conn, pymongo.mongo_client.MongoClient))
    db = get_db()
    self.assertTrue(isinstance(db, pymongo.database.Database))
    self.assertEqual(db.name, 'test')
