Example #1
0
 def _test_login(self, console):
     self._print_message(
         "We're about to test authentication. Simply enter valid credentials.",
         console,
     )
     interactive_authentication.authenticate(
         "https://.shotgunstudio.com", "", "", fixed_host=False
     )
     self._print_message("Test successful", console)
 def _test_login(self, console):
     self._print_message(
         "We're about to test authentication. Simply enter valid credentials.",
         console
     )
     interactive_authentication.authenticate(
         "https://.shotgunstudio.com",
         "",
         "",
         fixed_host=False
     )
     self._print_message(
         "Test successful",
         console
     )
 def _test_session_renewal(self, test_console):
     """
     First asks for the complete host and user information.
     Then prompts for password renewal with that information filled in.
     :param test_console: True is testing console prompt, False is we are testing ui prompt.
     """
     self._print_message(
         "We're about to test session renewal. We'll first prompt you for your "
         "credentials and then we'll fake a session that is expired.\nYou will then have to "
         "re-enter your password.", test_console
     )
     # Get the basic user credentials.
     host, login, session_token, session_metadata = interactive_authentication.authenticate(
         "https://enter_your_host_name_here.shotgunstudio.com",
         "enter_your_username_here",
         "",
         fixed_host=False
     )
     sg_user = user_impl.SessionUser(
         host=host, login=login, session_token=session_token, http_proxy=None
     )
     self._print_message("We're about to fake an expired session. Hang tight!", test_console)
     # Test the session renewal code.
     tank.authentication.interactive_authentication.renew_session(
         sg_user
     )
     self._print_message("Test successful", test_console)
 def _test_session_renewal(self, test_console):
     """
     First asks for the complete host and user information.
     Then prompts for password renewal with that information filled in.
     :param test_console: True is testing console prompt, False is we are testing ui prompt.
     """
     self._print_message(
         "We're about to test session renewal. We'll first prompt you for your "
         "credentials and then we'll fake a session that is expired.\nYou will then have to "
         "re-enter your password.", test_console
     )
     # Get the basic user credentials.
     host, login, session_token, session_metadata = interactive_authentication.authenticate(
         "https://enter_your_host_name_here.shotgunstudio.com",
         "enter_your_username_here",
         "",
         fixed_host=False
     )
     sg_user = user_impl.SessionUser(
         host=host, login=login, session_token=session_token, http_proxy=None
     )
     self._print_message("We're about to fake an expired session. Hang tight!", test_console)
     # Test the session renewal code.
     tank.authentication.interactive_authentication.renew_session(
         sg_user
     )
     self._print_message("Test successful", test_console)