예제 #1
0
파일: tests.py 프로젝트: zumbi/Nitrate
    def setUpTestData(cls):
        super(TestVisitEnvironmentGroupPage, cls).setUpTestData()

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

        cls.group_edit_url = reverse('management-env-group-edit')
        cls.group_nitrate = TCMSEnvGroupFactory(name='nitrate', manager=cls.tester)
        cls.disabled_group = TCMSEnvGroupFactory(name='disabled-group',
                                                 is_active=False,
                                                 manager=cls.tester)
예제 #2
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)
예제 #3
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')
예제 #4
0
파일: tests.py 프로젝트: zumbi/Nitrate
    def setUpTestData(cls):
        super(TestDeleteGroup, cls).setUpTestData()

        cls.group_delete_url = reverse('management-env-groups')
        cls.permission = 'management.delete_tcmsenvgroup'

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

        cls.group_nitrate = TCMSEnvGroupFactory(name='nitrate',
                                                manager=cls.group_manager)
        cls.group_fedora = TCMSEnvGroupFactory(name='fedora',
                                               manager=cls.group_manager)
예제 #5
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)
예제 #6
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)
예제 #7
0
    def _fixture_setup(self):
        super(TestUpdate, self)._fixture_setup()

        self.env_group_1 = TCMSEnvGroupFactory()
        self.env_group_2 = TCMSEnvGroupFactory()
        self.product = ProductFactory()
        self.version = VersionFactory(product=self.product)
        self.tester = UserFactory()
        self.plan_type = TestPlanTypeFactory(name='manual smoking')
        self.plan_1 = TestPlanFactory(product_version=self.version,
                                      product=self.product,
                                      author=self.tester,
                                      type=self.plan_type,
                                      env_group=(self.env_group_1, ))
        self.plan_2 = TestPlanFactory(product_version=self.version,
                                      product=self.product,
                                      author=self.tester,
                                      type=self.plan_type,
                                      env_group=(self.env_group_1, ))
예제 #8
0
    def setUpTestData(cls):
        cls.user = UserFactory()
        cls.http_req = make_http_request(user=cls.user,
                                         user_perm='testplans.change_testplan')

        cls.env_group_1 = TCMSEnvGroupFactory()
        cls.env_group_2 = TCMSEnvGroupFactory()
        cls.product = ProductFactory()
        cls.version = VersionFactory(product=cls.product)
        cls.tester = UserFactory()
        cls.plan_type = TestPlanTypeFactory(name='manual smoking')
        cls.plan_1 = TestPlanFactory(product_version=cls.version,
                                     product=cls.product,
                                     author=cls.tester,
                                     type=cls.plan_type,
                                     env_group=(cls.env_group_1,))
        cls.plan_2 = TestPlanFactory(product_version=cls.version,
                                     product=cls.product,
                                     author=cls.tester,
                                     type=cls.plan_type,
                                     env_group=(cls.env_group_1,))
예제 #9
0
    def setUpTestData(cls):
        super(TestModifyGroup, cls).setUpTestData()

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

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

        cls.permission = 'management.change_tcmsenvgroup'
        cls.group_modify_url = reverse('mgmt-environment_groups')
예제 #10
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')