'Test that invalid collection names raise InvalidConfiguration.'

def test_invalid_collection_name_validation(self):

    equivalent_namespace_config_kwargs = (dict(namespace_options={'invalid_db': 'newinvalid_db'}), dict(namespace_set=['invalid_db.']), dict(ex_namespace_set=['.invalid_db']), dict(gridfs_set=['.invalid_db']))
    for kwargs in equivalent_namespace_config_kwargs:
        with self.assertRaises(errors.InvalidConfiguration):
            NamespaceConfig(**kwargs)
