-
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.
- Loading branch information
Showing
7 changed files
with
182 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from posit import connect | ||
|
||
|
||
class TestAttributeContent: | ||
"""Checks behavior of the content attribute.""" | ||
|
||
@classmethod | ||
def setup_class(cls): | ||
cls.client = connect.Client() | ||
cls.user = cls.client.me | ||
cls.user.content.create( | ||
name="Sample", | ||
description="Simple sample content for testing", | ||
access_type="acl", | ||
) | ||
|
||
@classmethod | ||
def teardown_class(cls): | ||
assert cls.user.content.find_one().delete() is None | ||
assert cls.user.content.count() == 0 | ||
|
||
def test_count(self): | ||
assert self.user.content.count() == 1 | ||
|
||
def test_find(self): | ||
assert self.user.content.find() | ||
|
||
def test_find_one(self): | ||
assert self.user.content.find_one() |
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
53 changes: 53 additions & 0 deletions
53
tests/posit/connect/__api__/v1/content?owner_guid=20a79ce3-6e87-4522-9faf-be24228800a4.json
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,53 @@ | ||
[ | ||
{ | ||
"guid": "93a3cd6d-5a1b-236c-9808-6045f2a73fb5", | ||
"name": "My-Streamlit-app", | ||
"title": "My Streamlit app", | ||
"description": "", | ||
"access_type": "logged_in", | ||
"connection_timeout": null, | ||
"read_timeout": null, | ||
"init_timeout": null, | ||
"idle_timeout": null, | ||
"max_processes": null, | ||
"min_processes": null, | ||
"max_conns_per_process": null, | ||
"load_factor": null, | ||
"memory_request": null, | ||
"memory_limit": null, | ||
"cpu_request": null, | ||
"cpu_limit": null, | ||
"amd_gpu_limit": null, | ||
"nvidia_gpu_limit": null, | ||
"service_account_name": null, | ||
"default_image_name": null, | ||
"created_time": "2023-02-28T14:00:17Z", | ||
"last_deployed_time": "2023-03-01T14:12:21Z", | ||
"bundle_id": "217640", | ||
"app_mode": "python-streamlit", | ||
"content_category": "", | ||
"parameterized": false, | ||
"cluster_name": "Local", | ||
"image_name": null, | ||
"r_version": null, | ||
"py_version": "3.9.17", | ||
"quarto_version": null, | ||
"r_environment_management": null, | ||
"default_r_environment_management": null, | ||
"py_environment_management": true, | ||
"default_py_environment_management": null, | ||
"run_as": null, | ||
"run_as_current_user": false, | ||
"owner_guid": "20a79ce3-6e87-4522-9faf-be24228800a4", | ||
"content_url": "https://connect.example/content/93a3cd6d-5a1b-236c-9808-6045f2a73fb5/", | ||
"dashboard_url": "https://connect.example/connect/#/apps/93a3cd6d-5a1b-236c-9808-6045f2a73fb5", | ||
"app_role": "viewer", | ||
"id": "8462", | ||
"owner": { | ||
"guid": "20a79ce3-6e87-4522-9faf-be24228800a4", | ||
"username": "carlos12", | ||
"first_name": "Carlos", | ||
"last_name": "User" | ||
} | ||
} | ||
] |
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