MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / test_index_geo2d

Method test_index_geo2d

test/test_collection.py:440–445  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

438 self.assertEqual(True, (db.test.index_information())["hello_-1_world_1"]["unique"])
439
440 def test_index_geo2d(self):
441 db = self.db
442 db.test.drop_indexes()
443 self.assertEqual("loc_2d", db.test.create_index([("loc", GEO2D)]))
444 index_info = (db.test.index_information())["loc_2d"]
445 self.assertEqual([("loc", "2d")], index_info["key"])
446
447 # geoSearch was deprecated in 4.4 and removed in 5.0
448 @client_context.require_version_max(4, 5)

Callers

nothing calls this directly

Calls 3

drop_indexesMethod · 0.45
create_indexMethod · 0.45
index_informationMethod · 0.45

Tested by

no test coverage detected