Skip to content

Commit

Permalink
feat: improve content overload signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Sep 13, 2024
1 parent 5c6eed3 commit d5bc486
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 191 deletions.
10 changes: 6 additions & 4 deletions integration/tests/posit/connect/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestContent:
@classmethod
def setup_class(cls):
cls.client = connect.Client()
cls.content = cls.client.content.create(name="example")
cls.content = cls.client.content.create()

@classmethod
def teardown_class(cls):
Expand All @@ -23,7 +23,7 @@ def test_count(self):
assert self.client.content.count() == 1

def test_get(self):
assert self.client.content.get(self.content.guid) == self.content
assert self.client.content.get(self.content["guid"]) == self.content

def test_find(self):
assert self.client.content.find()
Expand All @@ -33,13 +33,15 @@ def test_find_one(self):

def test_content_item_owner(self):
item = self.client.content.find_one(include=None)
assert item
owner = item.owner
assert owner.guid == self.client.me.guid
assert owner["guid"] == self.client.me["guid"]

def test_content_item_owner_from_include(self):
item = self.client.content.find_one(include="owner")
assert item
owner = item.owner
assert owner.guid == self.client.me.guid
assert owner["guid"] == self.client.me["guid"]

@pytest.mark.skipif(
CONNECT_VERSION <= version.parse("2024.04.1"),
Expand Down
Loading

0 comments on commit d5bc486

Please sign in to comment.