pgadmin4/web/pgadmin/browser/tests/test_logout.py

48 lines
1.3 KiB
Python
Raw Normal View History

2017-03-16 09:27:55 -05:00
##########################################################################
#
2017-03-16 09:27:55 -05:00
# pgAdmin 4 - PostgreSQL Tools
#
2024-01-01 02:43:48 -06:00
# Copyright (C) 2013 - 2024, The pgAdmin Development Team
2017-03-16 09:27:55 -05:00
# This software is released under the PostgreSQL Licence
#
2017-03-16 09:27:55 -05:00
##########################################################################
from pgadmin.utils.route import BaseTestGenerator
from regression.python_test_utils import test_utils as utils
class LogoutTest(BaseTestGenerator):
"""
This class verifies the logout functionality; provided the user is already
logged-in. Dictionary parameters define the scenario appended by test
name.
"""
scenarios = [
# This test case validate the logout page
('Logging Out', dict(respdata='Redirecting...'))
]
@classmethod
def setUpClass(cls):
pass
2018-10-18 03:39:09 -05:00
# No need to call base class setup function
def setUp(self):
pass
def runTest(self):
"""This function checks the logout functionality."""
response = self.tester.get('/logout')
self.assertTrue(self.respdata in response.data.decode('utf8'))
@classmethod
def tearDownClass(cls):
"""
We need to again login the test client as soon as test scenarios
finishes.
"""
utils.login_tester_account(cls.tester)