From 3a79cd27226b0d0b2bb55e520f3240116143f486 Mon Sep 17 00:00:00 2001 From: tdstein Date: Thu, 7 Nov 2024 20:30:28 -0500 Subject: [PATCH] missed a few --- integration/tests/posit/connect/oauth/test_associations.py | 4 +++- integration/tests/posit/connect/oauth/test_integrations.py | 2 +- integration/tests/posit/connect/test_groups.py | 4 +++- src/posit/connect/groups.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/integration/tests/posit/connect/oauth/test_associations.py b/integration/tests/posit/connect/oauth/test_associations.py index 46035fc5..6ec3759d 100644 --- a/integration/tests/posit/connect/oauth/test_associations.py +++ b/integration/tests/posit/connect/oauth/test_associations.py @@ -87,7 +87,9 @@ def test_find_update_by_content(self): updated_associations = self.content.oauth.associations.find() assert len(updated_associations) == 1 assert updated_associations[0]["app_guid"] == self.content["guid"] - assert updated_associations[0]["oauth_integration_guid"] == self.another_integration.guid + assert ( + updated_associations[0]["oauth_integration_guid"] == self.another_integration["guid"] + ) # unset content association self.content.oauth.associations.delete() diff --git a/integration/tests/posit/connect/oauth/test_integrations.py b/integration/tests/posit/connect/oauth/test_integrations.py index 245b8d45..25720bb6 100644 --- a/integration/tests/posit/connect/oauth/test_integrations.py +++ b/integration/tests/posit/connect/oauth/test_integrations.py @@ -88,7 +88,7 @@ def test_create_update_delete(self): created.update(name="updated integration name") updated = self.client.oauth.integrations.get(integration["guid"]) - assert updated.name == "updated integration name" + assert updated["name"] == "updated integration name" # delete the new integration diff --git a/integration/tests/posit/connect/test_groups.py b/integration/tests/posit/connect/test_groups.py index ba2c0e94..6c64dd81 100644 --- a/integration/tests/posit/connect/test_groups.py +++ b/integration/tests/posit/connect/test_groups.py @@ -2,10 +2,12 @@ class TestGroups: + @classmethod def setup_class(cls): cls.client = connect.Client() cls.item = cls.client.groups.create(name="Friends") + @classmethod def teardown_class(cls): cls.item.delete() assert cls.client.groups.count() == 0 @@ -14,7 +16,7 @@ def test_count(self): assert self.client.groups.count() == 1 def test_get(self): - assert self.client.groups.get(self.item.guid) + assert self.client.groups.get(self.item["guid"]) def test_find(self): assert self.client.groups.find() == [self.item] diff --git a/src/posit/connect/groups.py b/src/posit/connect/groups.py index 3956e0bb..217f47ee 100644 --- a/src/posit/connect/groups.py +++ b/src/posit/connect/groups.py @@ -14,7 +14,7 @@ class Group(Resource): def delete(self) -> None: """Delete the group.""" - path = f"v1/groups/{self.guid}" + path = f"v1/groups/{self['guid']}" url = self.params.url + path self.params.session.delete(url)