示例#1
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.permission = 'management.change_tcmsenvproperty'
        cls.group_properties_url = reverse('management-env-properties')

        cls.tester = User.objects.create_user(username='******',
                                              email='*****@*****.**',
                                              password='******')

        cls.group_nitrate = f.TCMSEnvGroupFactory(name='nitrate')

        cls.property_os = f.TCMSEnvPropertyFactory(name='OS')
        cls.property_lang = f.TCMSEnvPropertyFactory(name='lang')
        cls.disabled_property_1 = f.TCMSEnvPropertyFactory(
            name='disabled-property-1', is_active=False)
        cls.disabled_property_2 = f.TCMSEnvPropertyFactory(
            name='disabled-property-2', is_active=False)

        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.property_os)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.property_lang)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.disabled_property_1)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.disabled_property_2)
示例#2
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.group_url = reverse('management-env-groups')

        cls.new_tester = User.objects.create_user(username='******',
                                                  email='*****@*****.**',
                                                  password='******')

        cls.group_1 = f.TCMSEnvGroupFactory(
            name='rhel-7', manager=cls.new_tester, modified_by=None)
        cls.group_2 = f.TCMSEnvGroupFactory(
            name='fedora', manager=cls.new_tester, modified_by=None)

        cls.group_1.log_action(
            who=cls.new_tester,
            field='',
            original_value='',
            new_value=f'Add group {cls.group_1.name}')

        cls.group_1.log_action(
            who=cls.new_tester,
            field='',
            original_value='',
            new_value=f'Edit group {cls.group_1.name}')

        cls.group_2.log_action(
            who=cls.new_tester,
            field='',
            original_value='',
            new_value=f'Edit group {cls.group_2.name}')

        cls.property_1 = f.TCMSEnvPropertyFactory()
        cls.property_2 = f.TCMSEnvPropertyFactory()
        cls.property_3 = f.TCMSEnvPropertyFactory()

        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_1,
                                         property=cls.property_1)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_1,
                                         property=cls.property_2)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_1,
                                         property=cls.property_3)

        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_2,
                                         property=cls.property_1)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_2,
                                         property=cls.property_3)
示例#3
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.get_info_url = reverse('ajax-getinfo')

        cls.group_nitrate = f.TCMSEnvGroupFactory(name='nitrate')
        cls.group_new = f.TCMSEnvGroupFactory(name='NewGroup')

        cls.property_os = f.TCMSEnvPropertyFactory(name='os')
        cls.property_python = f.TCMSEnvPropertyFactory(name='python')
        cls.property_django = f.TCMSEnvPropertyFactory(name='django')

        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.property_os)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.property_python)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_new,
                                         property=cls.property_django)
示例#4
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.permission = 'management.change_tcmsenvproperty'
        cls.set_status_url = reverse('management-set-env-property-status')

        cls.group_nitrate = f.TCMSEnvGroupFactory(name='nitrate')

        cls.property_os = f.TCMSEnvPropertyFactory(name='OS')
        cls.property_lang = f.TCMSEnvPropertyFactory(name='lang')
        cls.disabled_property_1 = f.TCMSEnvPropertyFactory(
            name='disabled-property-1', is_active=False)
        cls.disabled_property_2 = f.TCMSEnvPropertyFactory(
            name='disabled-property-2', is_active=False)

        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.property_os)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.property_lang)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.disabled_property_1)
        f.TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                         property=cls.disabled_property_2)