MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / login_tester_account

Function login_tester_account

web/regression/python_test_utils/test_utils.py:94–111  ·  view source on GitHub ↗

This function login the test client using env variables email and password :param tester: test client :type tester: flask test client object :return: None

(tester)

Source from the content-addressed store, hash-verified

92
93
94def login_tester_account(tester):
95 """
96 This function login the test client using env variables email and password
97 :param tester: test client
98 :type tester: flask test client object
99 :return: None
100 """
101 if os.environ['PGADMIN_SETUP_EMAIL'] and \
102 os.environ['PGADMIN_SETUP_PASSWORD']:
103 email = os.environ['PGADMIN_SETUP_EMAIL']
104 password = os.environ['PGADMIN_SETUP_PASSWORD']
105 tester.login(email, password)
106 else:
107 from regression.runtests import app_starter
108 print("Unable to login test client, email and password not found.",
109 file=sys.stderr)
110 _cleanup(tester, app_starter)
111 sys.exit(1)
112
113
114def get_config_data():

Callers 1

tearDownClassMethod · 0.90

Calls 2

_cleanupFunction · 0.85
loginMethod · 0.45

Tested by

no test coverage detected