

def test__getting_default_database_invalid(self):

    def client(uri):
        return mongomock.MongoClient(uri)
    c = client('mongodb://host1')
    with assert_raises(ConfigurationError):
        c.get_default_database()
    c = client('host1')
    with assert_raises(ConfigurationError):
        c.get_default_database()
    c = client('')
    with assert_raises(ConfigurationError):
        self.get_default_database()
    c = client('mongodb://host1/')
    with assert_raises(ConfigurationError):
        c.get_default_database()

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py DatabaseGettingTest.test__getting_default_database_invalid/VarMisuse@87/117 `c`->`self`