'Test the gridfs property is set correctly.'

def test_gridfs(self):

    equivalent_namespace_configs = (NamespaceConfig(gridfs_set=['db1.*']), NamespaceConfig(namespace_options={'db1.*': {'gridfs': True}}))
    for namespace_config in equivalent_namespace_configs:
        self.assertEqual(namespace_config.unmap_namespace('db1.col1'), 'db1.col1')
        self.assertEqual(namespace_config.unmap_namespace('db1.col2'), 'db1.col2')
        self.assertEqual(namespace_config.lookup('db1.col1'), Namespace(dest_name='db1.col1', source_name='db1.col1', gridfs=True))
        self.assertListEqual(namespace_config.map_db('db1'), ['db1'])
        self.assertEqual(namespace_config.map_namespace('db1.col1'), 'db1.col1')
        self.assertIsNone(namespace_config.map_namespace('db2.col4'))
        self.assertTrue(namespace_config.lookup('db1.col1').gridfs)
        self.assertEqual(namespace_config.gridfs_namespace('db1.col1'), 'db1.col1')
        self.assertIsNone(namespace_config.gridfs_namespace('not.gridfs'))
