-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
acc
and make_acc_group
fixtures
- Loading branch information
Showing
9 changed files
with
172 additions
and
20 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
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
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,3 @@ | ||
def test_listing_workspaces(acc): | ||
workspaces = acc.workspaces.list() | ||
assert len(workspaces) >= 1 |
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,14 +1,26 @@ | ||
from databricks.labs.pytester.fixtures.iam import make_user, make_group | ||
from databricks.labs.pytester.fixtures.iam import make_user, make_group, make_acc_group | ||
from databricks.labs.pytester.fixtures.unwrap import call_stateful | ||
|
||
|
||
def test_make_user_no_args(): | ||
ctx, user = call_stateful(make_user) | ||
assert ctx is not None | ||
assert user is not None | ||
ctx['ws'].users.create.assert_called_once() | ||
ctx['ws'].users.delete.assert_called_once() | ||
|
||
|
||
def test_make_group_no_args(): | ||
ctx, group = call_stateful(make_group) | ||
assert ctx is not None | ||
assert group is not None | ||
ctx['ws'].groups.create.assert_called_once() | ||
ctx['ws'].groups.delete.assert_called_once() | ||
|
||
|
||
def test_make_acc_group_no_args(): | ||
ctx, group = call_stateful(make_acc_group) | ||
assert ctx is not None | ||
assert group is not None | ||
ctx['acc'].groups.create.assert_called_once() | ||
ctx['acc'].groups.delete.assert_called_once() |