Skip to content

Commit c4e761e

Browse files
authored
fix: content overload signatures (#290)
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
1 parent 723ee61 commit c4e761e

File tree

3 files changed

+295
-183
lines changed

3 files changed

+295
-183
lines changed

integration/tests/posit/connect/test_content.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TestContent:
1212
@classmethod
1313
def setup_class(cls):
1414
cls.client = connect.Client()
15-
cls.content = cls.client.content.create(name="example")
15+
cls.content = cls.client.content.create()
1616

1717
@classmethod
1818
def teardown_class(cls):
@@ -23,7 +23,7 @@ def test_count(self):
2323
assert self.client.content.count() == 1
2424

2525
def test_get(self):
26-
assert self.client.content.get(self.content.guid) == self.content
26+
assert self.client.content.get(self.content["guid"]) == self.content
2727

2828
def test_find(self):
2929
assert self.client.content.find()
@@ -33,13 +33,15 @@ def test_find_one(self):
3333

3434
def test_content_item_owner(self):
3535
item = self.client.content.find_one(include=None)
36+
assert item
3637
owner = item.owner
37-
assert owner.guid == self.client.me.guid
38+
assert owner["guid"] == self.client.me["guid"]
3839

3940
def test_content_item_owner_from_include(self):
4041
item = self.client.content.find_one(include="owner")
42+
assert item
4143
owner = item.owner
42-
assert owner.guid == self.client.me.guid
44+
assert owner["guid"] == self.client.me["guid"]
4345

4446
@pytest.mark.skipif(
4547
CONNECT_VERSION <= version.parse("2024.04.1"),

0 commit comments

Comments
 (0)