Exemplo n.º 1
0
def test_expected_exception_get() -> None:
    """Test expected exception."""
    with pytest.raises(ValueError):
        connect = Connect(connect_url="http://some-url")
        connect._request(HTTPMethod.GET,
                         uri="http://some-url",
                         data='{"foo": "bar"}')
def test_expected_exception_delete() -> None:
    with pytest.raises(ValueError):
        connect = Connect(connect_url="http://some-url")
        connect._request(HTTPMethod.DELETE,
                         uri="http://some-url",
                         data='{"foo": "bar"}')