-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from zcutlip/development
merge development into main: v4.2.0
- Loading branch information
Showing
152 changed files
with
1,288 additions
and
76 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,37 @@ | ||
from do_signin import do_signin | ||
|
||
from pyonepassword.api.exceptions import OPUserEditException | ||
|
||
|
||
def user_edit_set_travel_mode(): | ||
op = do_signin() | ||
user_name = "Example User" | ||
|
||
# Toggle travel mode on | ||
# user_edit() returns the unique user ID | ||
user_id = op.user_edit(user_name, travel_mode=True) | ||
|
||
# Toggle travel mode back off | ||
# When editing users, either user name or unique user ID is okay | ||
op.user_edit(user_id, travel_mode=False) | ||
|
||
|
||
def user_edit_set_user_name(): | ||
op = do_signin() | ||
user_name = "Example User" | ||
|
||
new_user_name = "Example User - updated" | ||
|
||
# set new username | ||
op.user_edit(user_name, new_user_name=new_user_name) | ||
|
||
|
||
def user_edit_invalid_user(): | ||
|
||
op = do_signin() | ||
user_name = "Nonexistent User" | ||
|
||
try: | ||
op.user_edit(user_name, travel_mode=False) | ||
except OPUserEditException as e: | ||
print(e.err_output) |
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
Oops, something went wrong.