Esempio n. 1
0
    def init_requirements():
        # Import the required model and data
        from ava_core.gather.gather_ldap.models import LDAPGatherHistory
        from ava_core.gather.gather_ldap.test_data import LDAPGatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if LDAPGatherHistory.objects.count() == 0:
            LDAPGatherHistoryTestData.init_requirements()
            model = LDAPGatherHistory.objects.create(
                **LDAPGatherHistoryTestData.get_data('standard'))
            model.save()
            model = LDAPGatherHistory.objects.create(
                **LDAPGatherHistoryTestData.get_data('unique'))
            model.save()

        # Import the required model and data
        from ava_core.integration.integration_abstract.models import IntegrationAdapter
        from ava_core.integration.integration_abstract.test_data import IntegrationAdapterTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if IntegrationAdapter.objects.count() == 0:
            IntegrationAdapterTestData.init_requirements()
            model = IntegrationAdapter.objects.create(
                **IntegrationAdapterTestData.get_data('standard'))
            model.save()
            model = IntegrationAdapter.objects.create(
                **IntegrationAdapterTestData.get_data('unique'))
            model.save()
Esempio n. 2
0
    def init_requirements():
        # Import the required model and data
        from ava_core.gather.gather_google.models import GoogleGatherHistory
        from ava_core.gather.gather_google.test_data import GoogleGatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if GoogleGatherHistory.objects.count() == 0:
            GoogleGatherHistoryTestData.init_requirements()
            model = GoogleGatherHistory.objects.create(
                **GoogleGatherHistoryTestData.get_data('standard'))
            model.save()
            model = GoogleGatherHistory.objects.create(
                **GoogleGatherHistoryTestData.get_data('unique'))
            model.save()

        # Import the required model and data
        from ava_core.gather.gather_ldap.models import LDAPGatherHistory
        from ava_core.gather.gather_ldap.test_data import LDAPGatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if LDAPGatherHistory.objects.count() == 0:
            LDAPGatherHistoryTestData.init_requirements()
            model = LDAPGatherHistory.objects.create(
                **LDAPGatherHistoryTestData.get_data('standard'))
            model.save()
            model = LDAPGatherHistory.objects.create(
                **LDAPGatherHistoryTestData.get_data('unique'))
            model.save()

        # Import the required model and data
        from ava_core.gather.gather_office365.models import Office365GatherHistory
        from ava_core.gather.gather_office365.test_data import Office365GatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if Office365GatherHistory.objects.count() == 0:
            Office365GatherHistoryTestData.init_requirements()
            model = Office365GatherHistory.objects.create(
                **Office365GatherHistoryTestData.get_data('standard'))
            model.save()
            model = Office365GatherHistory.objects.create(
                **Office365GatherHistoryTestData.get_data('unique'))
            model.save()
Esempio n. 3
0
    def init_requirements():
        # Import the required model and data
        from ava_core.gather.gather_google.models import GoogleGatherHistory
        from ava_core.gather.gather_google.test_data import GoogleGatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if GoogleGatherHistory.objects.count() == 0:
            GoogleGatherHistoryTestData.init_requirements()
            model = GoogleGatherHistory.objects.create(**GoogleGatherHistoryTestData.get_data('standard'))
            model.save()
            model = GoogleGatherHistory.objects.create(**GoogleGatherHistoryTestData.get_data('unique'))
            model.save()

        # Import the required model and data
        from ava_core.gather.gather_ldap.models import LDAPGatherHistory
        from ava_core.gather.gather_ldap.test_data import LDAPGatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if LDAPGatherHistory.objects.count() == 0:
            LDAPGatherHistoryTestData.init_requirements()
            model = LDAPGatherHistory.objects.create(**LDAPGatherHistoryTestData.get_data('standard'))
            model.save()
            model = LDAPGatherHistory.objects.create(**LDAPGatherHistoryTestData.get_data('unique'))
            model.save()

        # Import the required model and data
        from ava_core.gather.gather_office365.models import Office365GatherHistory
        from ava_core.gather.gather_office365.test_data import Office365GatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if Office365GatherHistory.objects.count() == 0:
            Office365GatherHistoryTestData.init_requirements()
            model = Office365GatherHistory.objects.create(**Office365GatherHistoryTestData.get_data('standard'))
            model.save()
            model = Office365GatherHistory.objects.create(**Office365GatherHistoryTestData.get_data('unique'))
            model.save()
Esempio n. 4
0
    def init_requirements():
        # Import the required model and data
        from ava_core.gather.gather_ldap.models import LDAPGatherHistory
        from ava_core.gather.gather_ldap.test_data import LDAPGatherHistoryTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if LDAPGatherHistory.objects.count() == 0:
            LDAPGatherHistoryTestData.init_requirements()
            model = LDAPGatherHistory.objects.create(**LDAPGatherHistoryTestData.get_data('standard'))
            model.save()
            model = LDAPGatherHistory.objects.create(**LDAPGatherHistoryTestData.get_data('unique'))
            model.save()

        # Import the required model and data
        from ava_core.integration.integration_abstract.models import IntegrationAdapter
        from ava_core.integration.integration_abstract.test_data import IntegrationAdapterTestData
        # Check that requirements haven't already been created.
        # True - Create necessary requirements.
        if IntegrationAdapter.objects.count() == 0:
            IntegrationAdapterTestData.init_requirements()
            model = IntegrationAdapter.objects.create(**IntegrationAdapterTestData.get_data('standard'))
            model.save()
            model = IntegrationAdapter.objects.create(**IntegrationAdapterTestData.get_data('unique'))
            model.save()