def test_clear(self, mock_clear: mock.Mock) -> None: """Ensure the processor proxies to the global method.""" p = contextvars.Processor() p.clear() mock_clear.assert_called_once()
def test_bind(self, mock_bind: mock.Mock) -> None: """Ensure the processor proxies to the global method.""" p = contextvars.Processor() p.bind(a=1, b=2) mock_bind.assert_called_once_with(a=1, b=2)
def test_unbind(self, mock_unbind: mock.Mock) -> None: """Ensure the processor proxies to the global method.""" p = contextvars.Processor() p.unbind("a", "b") mock_unbind.assert_called_once_with("a", "b")
def test_merge(self, mock_merge: mock.Mock) -> None: """Ensure the processor proxies to the global method.""" p = contextvars.Processor() p.merge({"a": "b"}) mock_merge.assert_called_once_with({"a": "b"})