Skip to content

Commit e1be1c4

Browse files
committed
test: verify required version for oauth
1 parent 3eeccd4 commit e1be1c4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/posit/connect/test_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,13 @@ def test_delete(self, MockSession):
172172
client = Client(api_key=api_key, url=url)
173173
client.delete("/foo")
174174
client.session.delete.assert_called_once_with("https://connect.example.com/__api__/foo")
175+
176+
177+
class TestClientOAuth:
178+
def test_required_version(self):
179+
api_key = "12345"
180+
url = "https://connect.example.com"
181+
client = Client(api_key=api_key, url=url)
182+
client.ctx.version = "2024.07.0"
183+
with pytest.raises(RuntimeError):
184+
client.oauth

0 commit comments

Comments
 (0)