Skip to content

Commit

Permalink
fix test sudo_as_login
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-delaporte committed Nov 2, 2020
1 parent cbff75a commit 6502bbe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/authentication_tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ def _create_script_user(self):
api_script="api_script",
api_key="api_key",
http_proxy="http_proxy",
sudo_as_login=None,
)
)

def _create_script_sudo_as_login_user(self):
return user.ShotgunUser(
user_impl.ScriptUser(
host="host",
api_script="api_script",
api_key="api_key",
http_proxy="http_proxy",
sudo_as_login="sudo_as_login",
)
)

Expand Down Expand Up @@ -96,6 +108,11 @@ def test_login_value(self):
script_user = self._create_script_user()
self.assertIsNone(script_user.login)

sudo_user = self._create_script_sudo_as_login_user()
self.assertEqual(sudo_user.login, "sudo_as_login")
self.assertEqual(sudo_user.sudo_as_login, "sudo_as_login")


class CustomUser(user_impl.ShotgunUserImpl):
def __init__(self):
super(CustomUser, self).__init__("https://test.shotgunstudio.com", None)
Expand Down

0 comments on commit 6502bbe

Please sign in to comment.