Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds remote groups #228

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,5 @@ cython_debug/

# Ruff
.ruff_cache/

/.luarc.json
12 changes: 12 additions & 0 deletions integration/tests/posit/connect/test_groups.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

from posit import connect


Expand All @@ -12,12 +14,22 @@ def teardown_class(cls):

def test_count(self):
assert self.client.groups.count() == 1
assert self.client.groups.count(prefix="f") == 1
assert self.client.groups.count(prefix="miss") == 0

def test_get(self):
assert self.client.groups.get(self.item.guid)

def test_find(self):
assert self.client.groups.find() == [self.item]
assert self.client.groups.find(prefix="f") == [self.item]
assert self.client.groups.find(prefix="miss") == []

def test_find_one(self):
assert self.client.groups.find_one() == self.item
assert self.client.groups.find_one(prefix="f") == self.item
assert self.client.groups.find_one(prefix="miss") is None

def test_remote(self):
with pytest.raises(connect.errors.ClientError):
self.client.groups.find(remote=True)
1 change: 1 addition & 0 deletions src/posit/connect/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .client import Client # noqa
from .errors import ClientError # noqa
Loading
Loading