Skip to content

Commit

Permalink
test: verify required version for oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Oct 7, 2024
1 parent 3eeccd4 commit e1be1c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/posit/connect/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e1be1c4

Please sign in to comment.