(self, user_details,
is_api=True, create_conn=True)
| 1799 | |
| 1800 | |
| 1801 | def 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 | |
| 1824 | def create_user_wise_test_client(user): |
no test coverage detected