def test_disconnected(self, close, open): close.return_value = None open.return_value = None cnn = Milvus() cnn.connect(**self.param) assert cnn.disconnect().OK()
def test_disconnected_error(self): cnn = Milvus() cnn.status = Status(Status.PERMISSION_DENIED) with pytest.raises(DisconnectNotConnectedClientError): cnn.disconnect()