Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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")
Ejemplo n.º 4
0
    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"})