mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-09 04:28:38 -05:00
Test suite improvements:
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and PPAS are included in both .in files. - Removed the logic of logging in the test client on each test scenario(As per Khushboo's comment in previous email). We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
This commit is contained in:
committed by
Dave Page
parent
b6e8d195dc
commit
5c3c543d2e
@@ -50,12 +50,24 @@ class TestsGeneratorRegistry(ABCMeta):
|
||||
|
||||
from importlib import import_module
|
||||
from werkzeug.utils import find_modules
|
||||
import config
|
||||
|
||||
for module_name in find_modules(pkg, False, True):
|
||||
try:
|
||||
module = import_module(module_name)
|
||||
except ImportError:
|
||||
pass
|
||||
# Check for SERVER mode
|
||||
if config.SERVER_MODE:
|
||||
for module_name in find_modules(pkg, False, True):
|
||||
try:
|
||||
module = import_module(module_name)
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
for module_name in find_modules(pkg, False, True):
|
||||
try:
|
||||
# Exclude the test cases in browser node if SERVER_MODE
|
||||
# is False
|
||||
if "pgadmin.browser.tests" not in module_name:
|
||||
module = import_module(module_name)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
import six
|
||||
|
||||
|
||||
Reference in New Issue
Block a user