(self)
| 1973 | client.close() |
| 1974 | |
| 1975 | def test_srv_max_hosts_kwarg(self): |
| 1976 | client = self.simple_client("mongodb+srv://test1.test.build.10gen.cc/") |
| 1977 | client._connect() |
| 1978 | self.assertGreater(len(client.topology_description.server_descriptions()), 1) |
| 1979 | client = self.simple_client("mongodb+srv://test1.test.build.10gen.cc/", srvmaxhosts=1) |
| 1980 | client._connect() |
| 1981 | self.assertEqual(len(client.topology_description.server_descriptions()), 1) |
| 1982 | client = self.simple_client( |
| 1983 | "mongodb+srv://test1.test.build.10gen.cc/?srvMaxHosts=1", srvmaxhosts=2 |
| 1984 | ) |
| 1985 | client._connect() |
| 1986 | self.assertEqual(len(client.topology_description.server_descriptions()), 2) |
| 1987 | |
| 1988 | @unittest.skipIf( |
| 1989 | client_context.load_balancer, |
nothing calls this directly
no test coverage detected