-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: always resolve content owner (#224)
- Loading branch information
Showing
7 changed files
with
102 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import os | ||
import pytest | ||
|
||
from posit import connect | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from posit import connect | ||
|
||
|
||
class TestContent: | ||
def setup_class(cls): | ||
cls.client = connect.Client() | ||
cls.item = cls.client.content.create( | ||
name="Sample", | ||
description="Simple sample content for testing", | ||
access_type="acl", | ||
) | ||
|
||
def test_count(self): | ||
assert self.client.content.count() == 1 | ||
|
||
def test_get(self): | ||
assert self.client.content.get(self.item.guid) == self.item | ||
|
||
def test_find(self): | ||
assert self.client.content.find() | ||
|
||
def test_find_one(self): | ||
assert self.client.content.find_one() | ||
|
||
def test_content_item_owner(self): | ||
item = self.client.content.find_one(include=None) | ||
owner = item.owner | ||
assert owner.guid == self.client.me.guid | ||
|
||
def test_content_item_owner_from_include(self): | ||
item = self.client.content.find_one(include="owner") | ||
owner = item.owner | ||
assert owner.guid == self.client.me.guid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ | |
"confirmed": true, | ||
"locked": false, | ||
"guid": "20a79ce3-6e87-4522-9faf-be24228800a4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters