Skip to content

Commit

Permalink
fix: content overload signatures (#290)
Browse files Browse the repository at this point in the history
Simplifies or, in most cases, corrects the overload signature. Variable
names and documentation are updated along the way.

- Renames `kwargs` based on context. The variable name `conditions` is
introduced for querying methods. The variable name `attributes` is
introduced for record manipulation. This also signifies that this is not
a passthrough method.
- Documentation is updated to reflect the current state of Posit
Connect.
- Removes deprecations for field names in integration tests.

Resolves #140
  • Loading branch information
tdstein authored Sep 13, 2024
1 parent 723ee61 commit c4e761e
Show file tree
Hide file tree
Showing 3 changed files with 295 additions and 183 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 c4e761e

Please sign in to comment.