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

Function get_test_user

web/regression/python_test_utils/test_utils.py:1801–1821  ·  view source on GitHub ↗
(self, user_details,
                  is_api=True, create_conn=True)

Source from the content-addressed store, hash-verified

1799
1800
1801def get_test_user(self, user_details,
1802 is_api=True, create_conn=True):
1803 if user_details is None:
1804 return None, None
1805
1806 if is_api is True:
1807
1808 # Create test_client for this user, and login through it.
1809 test_client = self.app.test_client()
1810 user = create_user(user_details)
1811 if user is not None:
1812 test_client.test_config_data = dict({
1813 "login_username": user_details['login_username'],
1814 "login_password": user_details['login_password']
1815 })
1816 else:
1817 return "User not created"
1818 login_using_user_account(test_client)
1819 user = test_client
1820
1821 return user
1822
1823
1824def create_user_wise_test_client(user):

Callers 1

wrapperFunction · 0.85

Calls 2

login_using_user_accountFunction · 0.85
create_userFunction · 0.70

Tested by

no test coverage detected