Beispiel #1
0
    def setUp(self):
        super().setUp()

        # truncate old data in the table
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)

        # create table
        mock_pm_awsAccountCoops.create_table()
Beispiel #2
0
    def setUp(self):
        super().setUp()

        # truncate data old table
        if db_utils.check_table_exist(Tables.PM_AFFILIATION):
            db_utils.delete_table(Tables.PM_AFFILIATION)
        if db_utils.check_table_exist(Tables.PM_EXCLUSION_RESOURCES):
            db_utils.delete_table(Tables.PM_EXCLUSION_RESOURCES)
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)

        # create table
        mock_pm_affiliation.create_table()
        mock_pm_awsAccountCoops.create_table()
        mock_pm_exclusionResources.create_table()
Beispiel #3
0
    def setUp(self):
        super().setUp()

        # truncate old data in the table
        if db_utils.check_table_exist(Tables.PM_AFFILIATION):
            db_utils.delete_table(Tables.PM_AFFILIATION)
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)
        if db_utils.check_table_exist(Tables.PM_ASSESSMENT_ITEMS):
            db_utils.delete_table(Tables.PM_ASSESSMENT_ITEMS)

        # create table
        mock_pm_affiliation.create_table()
        mock_pm_awsAccountCoops.create_table()
        mock_pm_assessmentItems.create_table()
Beispiel #4
0
    def setUp(self):
        super().setUp()

        # truncate old data in the table
        if db_utils.check_table_exist(Tables.PM_AFFILIATION):
            db_utils.delete_table(Tables.PM_AFFILIATION)
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)
        if db_utils.check_table_exist(Tables.PM_CHECK_RESULT_ITEMS):
            db_utils.delete_table(Tables.PM_CHECK_RESULT_ITEMS)
        if db_utils.check_table_exist(Tables.PM_LATEST_CHECK_RESULT):
            db_utils.delete_table(Tables.PM_LATEST_CHECK_RESULT)

        # create table
        mock_pm_affiliation.create_table()
        mock_pm_awsAccountCoops.create_table()
        mock_pm_checkResultItems.create_table()
        mock_pm_latestCheckResult.create_table()
    def setUp(self):
        super().setUp()

        # truncate old data in the table
        if db_utils.check_table_exist(Tables.PM_CHECK_HISTORY):
            db_utils.delete_table(Tables.PM_CHECK_HISTORY)
        if db_utils.check_table_exist(Tables.PM_PROJECTS):
            db_utils.delete_table(Tables.PM_PROJECTS)
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)
        if db_utils.check_table_exist(Tables.PM_ORGANIZATIONS):
            db_utils.delete_table(Tables.PM_ORGANIZATIONS)
        if db_utils.check_table_exist(Tables.PM_CHECK_RESULTS):
            db_utils.delete_table(Tables.PM_CHECK_RESULTS)

        # create table
        mock_pm_checkHistory.create_table()
        mock_pm_projects.create_table()
        mock_pm_awsAccountCoops.create_table()
        mock_pm_organizations.create_table()
        mock_pm_checkResults.create_table()
    def setUp(self):
        super().setUp()

        # truncate old data in the table
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)

        if db_utils.check_table_exist(Tables.PM_SECURITY_CHECK_WEBHOOK):
            db_utils.delete_table(Tables.PM_SECURITY_CHECK_WEBHOOK)

        if db_utils.check_table_exist(
                Tables.PM_SECURITY_CHECK_WEBHOOK_CALL_HISTORY):
            db_utils.delete_table(
                Tables.PM_SECURITY_CHECK_WEBHOOK_CALL_HISTORY)

        if db_utils.check_table_exist(Tables.PM_REPORTS):
            db_utils.delete_table(Tables.PM_REPORTS)

        # create pm_awsAccountCoops table
        mock_pm_awsAccountCoops.create_table()
        # create data table pm_awsAccountCoops
        for data_pm_aws_account_coops in list_data_pm_aws_account_coops:
            mock_pm_awsAccountCoops.create(data_pm_aws_account_coops)
Beispiel #7
0
    def setUp(self):
        super().setUp()

        # truncate old data in the table
        if db_utils.check_table_exist(Tables.PM_AFFILIATION):
            db_utils.delete_table(Tables.PM_AFFILIATION)
        if db_utils.check_table_exist(Tables.PM_PROJECTS):
            db_utils.delete_table(Tables.PM_PROJECTS)
        if db_utils.check_table_exist(Tables.PM_ASSESSMENT_ITEMS):
            db_utils.delete_table(Tables.PM_ASSESSMENT_ITEMS)
        if db_utils.check_table_exist(Tables.PM_EXCLUSION_ITEMS):
            db_utils.delete_table(Tables.PM_EXCLUSION_ITEMS)
        if db_utils.check_table_exist(Tables.PM_EXCLUSION_RESOURCES):
            db_utils.delete_table(Tables.PM_EXCLUSION_RESOURCES)
        if db_utils.check_table_exist(Tables.PM_AWSACCOUNTCOOPS):
            db_utils.delete_table(Tables.PM_AWSACCOUNTCOOPS)

        # create table
        mock_pm_affiliation.create_table()
        mock_pm_projects.create_table()
        mock_pm_awsAccountCoops.create_table()
        mock_pm_assessmentItems.create_table()
        mock_pm_exclusionItems.create_table()
        mock_pm_exclusionResources.create_table()