From e1be1c47ad21f0b277a4032349763c989c93b7a7 Mon Sep 17 00:00:00 2001 From: tdstein Date: Mon, 7 Oct 2024 13:47:41 -0400 Subject: [PATCH] test: verify required version for oauth --- tests/posit/connect/test_client.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/posit/connect/test_client.py b/tests/posit/connect/test_client.py index 7af64103..217f359c 100644 --- a/tests/posit/connect/test_client.py +++ b/tests/posit/connect/test_client.py @@ -172,3 +172,13 @@ def test_delete(self, MockSession): client = Client(api_key=api_key, url=url) client.delete("/foo") client.session.delete.assert_called_once_with("https://connect.example.com/__api__/foo") + + +class TestClientOAuth: + def test_required_version(self): + api_key = "12345" + url = "https://connect.example.com" + client = Client(api_key=api_key, url=url) + client.ctx.version = "2024.07.0" + with pytest.raises(RuntimeError): + client.oauth