##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################

import os
import sys

from pgadmin.utils.driver import DriverRegistry
from regression.python_test_utils.template_helper import file_as_template

DriverRegistry.load_drivers()
from pgadmin.utils.route import BaseTestGenerator
from regression.python_test_utils import test_utils

if sys.version_info[0] >= 3:
    long = int


class TestColumnForeignKeyGetConstraintCols(BaseTestGenerator):
    scenarios = [
        ("Test foreign key get constraint with no foreign key properties on"
         " the column", dict())
    ]

    def runTest(self):
        """ When there are no foreign key properties on the column, it returns
示例#2
0
##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################

from pgadmin.utils.route import BaseTestGenerator
from regression.python_test_utils import test_utils
from pgadmin.utils.driver import DriverRegistry

DriverRegistry.load_drivers()


class SQLTemplateTestBase(BaseTestGenerator):
    scenarios = [("parent test class", dict(ignore_test=True))]

    def __init__(self):
        super(SQLTemplateTestBase, self).__init__()
        self.database_name = -1
        self.versions_to_test = -1

    def test_setup(self, connection, cursor):
        pass

    def generate_sql(self, version):
        pass

    def assertions(self, fetch_result, descriptions):
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2022, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################

import os

from pgadmin.utils.route import BaseTestGenerator
from regression.python_test_utils import test_utils
from pgadmin.utils.driver import DriverRegistry
from pgadmin.utils.versioned_template_loader \
    import get_version_mapping_directories

DriverRegistry.load_modules()


class SQLTemplateTestBase(BaseTestGenerator):
    scenarios = [("parent test class", dict(ignore_test=True))]

    def __init__(self):
        super(SQLTemplateTestBase, self).__init__()
        self.database_name = -1

    def test_setup(self, connection, cursor):
        # To be implemented by child classes
        pass

    def generate_sql(self, version):
        # To be implemented by child classes