예제 #1
0
    def setUpTestData(cls):
        super(TestEnableDisableProperty, cls).setUpTestData()

        cls.permission = 'management.change_tcmsenvproperty'
        cls.group_properties_url = reverse(
            'tcms.management.views.environment_properties')

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

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

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

        TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                       property=cls.property_os)
        TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                       property=cls.property_lang)
        TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                       property=cls.disabled_property_1)
        TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                       property=cls.disabled_property_2)
예제 #2
0
파일: tests.py 프로젝트: zumbi/Nitrate
    def setUpTestData(cls):
        super(TestEditEnvironmentGroup, cls).setUpTestData()

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

        cls.group_nitrate = TCMSEnvGroupFactory(name='nitrate', manager=cls.tester)
        cls.duplicate_group = TCMSEnvGroupFactory(name='fedora', manager=cls.tester)

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

        cls.group_edit_url = reverse('management-env-group-edit')
예제 #3
0
    def setUpTestData(cls):
        super(TestGetObjectInfo, cls).setUpTestData()

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

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

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

        TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                       property=cls.property_os)
        TCMSEnvGroupPropertyMapFactory(group=cls.group_nitrate,
                                       property=cls.property_python)
        TCMSEnvGroupPropertyMapFactory(group=cls.group_new,
                                       property=cls.property_django)
예제 #4
0
파일: tests.py 프로젝트: zumbi/Nitrate
    def setUpTestData(cls):
        super(TestVisitAndSearchGroupPage, cls).setUpTestData()

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

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

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

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

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

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

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

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

        TCMSEnvGroupPropertyMapFactory(group=cls.group_2, property=cls.property_1)
        TCMSEnvGroupPropertyMapFactory(group=cls.group_2, property=cls.property_3)
예제 #5
0
    def setUpTestData(cls):
        super(TestEditProperty, cls).setUpTestData()

        cls.permission = 'management.change_tcmsenvproperty'
        cls.group_properties_url = reverse('mgmt-environment_properties')

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

        cls.property = TCMSEnvPropertyFactory(name='f26')
예제 #6
0
파일: tests.py 프로젝트: zumbi/Nitrate
    def setUpTestData(cls):
        super(TestAddProperty, cls).setUpTestData()

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

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

        cls.group_nitrate = TCMSEnvGroupFactory(name='nitrate', manager=cls.tester)
        cls.duplicate_property = TCMSEnvPropertyFactory(name='f26')