mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
#######################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2022, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
##########################################################################
|
|
from pgadmin.utils.route import BaseTestGenerator
|
|
from .registry import test_load_modules_based_registry, test_empty_registry, \
|
|
test_create_base_class, test_load_classname_registry
|
|
|
|
|
|
class TestDynamicRegistry(BaseTestGenerator):
|
|
|
|
scenarios = [
|
|
(
|
|
"Check empty registry",
|
|
dict(test=test_empty_registry),
|
|
),
|
|
(
|
|
'Load the registry based on the modules',
|
|
dict(test=test_load_modules_based_registry),
|
|
),
|
|
(
|
|
'Load the registry based on the name of the classes',
|
|
dict(test=test_load_classname_registry),
|
|
),
|
|
(
|
|
"When created a base class registry is initialized",
|
|
dict(test=test_create_base_class),
|
|
),
|
|
]
|
|
|
|
def runTest(self):
|
|
error = self.test()
|
|
|
|
if error is not None:
|
|
self.fail(error)
|