Example #1
0
    def setUpTestData(cls):
        super().setUpTestData()
        cls.property_py = f.TCMSEnvPropertyFactory(name='python')
        cls.property_db = f.TCMSEnvPropertyFactory(name='db')
        f.TCMSEnvValueFactory(value='mysql', property=cls.property_db)

        user_should_have_perm(cls.tester, 'management.add_tcmsenvvalue')
Example #2
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)
Example #3
0
    def setUpTestData(cls):
        super().setUpTestData()

        user_should_have_perm(cls.tester, 'management.change_tcmsenvgroup')

        cls.group_nitrate = f.TCMSEnvGroupFactory(
            name='nitrate', manager=cls.tester)
        cls.group_db = f.TCMSEnvGroupFactory(
            name='db', is_active=False, manager=cls.tester)
        cls.duplicate_group = f.TCMSEnvGroupFactory(
            name='fedora', manager=cls.tester)

        cls.property_1 = f.TCMSEnvPropertyFactory()
        cls.property_2 = f.TCMSEnvPropertyFactory()
        cls.property_3 = f.TCMSEnvPropertyFactory()
Example #4
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.property_1 = f.TCMSEnvPropertyFactory(name='property1')
        cls.property_2 = f.TCMSEnvPropertyFactory(name='property2')
        cls.property_3 = f.TCMSEnvPropertyFactory(
            name='property3', is_active=False)
        cls.grp_1 = f.TCMSEnvGroupFactory(
            name='group1', property=[
                cls.property_1, cls.property_2, cls.property_3])

        cls.property_4 = f.TCMSEnvPropertyFactory(
            name='property4', is_active=False)
        cls.property_5 = f.TCMSEnvPropertyFactory(name='property5')
        cls.grp_2 = f.TCMSEnvGroupFactory(
            name='group2', property=[cls.property_4, cls.property_5])
Example #5
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.property_1 = f.TCMSEnvPropertyFactory(name='property1')
        cls.value_1 = f.TCMSEnvValueFactory(
            value='value1', is_active=False, property=cls.property_1)
        cls.value_2 = f.TCMSEnvValueFactory(
            value='value2', property=cls.property_1)

        cls.property_2 = f.TCMSEnvPropertyFactory(name='property2')
        cls.value_3 = f.TCMSEnvValueFactory(
            value='value3', property=cls.property_2)
        cls.value_4 = f.TCMSEnvValueFactory(
            value='value4', is_active=False, property=cls.property_2)
        cls.value_5 = f.TCMSEnvValueFactory(
            value='value5', property=cls.property_2)
Example #6
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)
Example #7
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.permission = 'management.change_tcmsenvproperty'

        cls.property = f.TCMSEnvPropertyFactory(name='f26')
        cls.property_edit_url = reverse('management-edit-env-property',
                                        args=[cls.property.pk])
Example #8
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)
Example #9
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.permission = 'management.add_tcmsenvproperty'
        cls.add_group_property_url = reverse('management-add-env-property')

        cls.group_nitrate = f.TCMSEnvGroupFactory(
            name='nitrate', manager=cls.tester)
        cls.duplicate_property = f.TCMSEnvPropertyFactory(name='f26')
Example #10
0
    def setUpTestData(cls):
        super().setUpTestData()

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

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

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

        cls.group_edit_url = reverse('management-env-group-edit')
Example #11
0
    def setUpTestData(cls):
        super().setUpTestData()
        user_should_have_perm(cls.tester, 'management.change_tcmsenvvalue')

        cls.property_db = f.TCMSEnvPropertyFactory(name='db')
        cls.property_value = f.TCMSEnvValueFactory(
            value='mysql', property=cls.property_db)

        cls.edit_url = reverse('management-env-property-value-edit',
                               args=[cls.property_value.pk])
Example #12
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.property = f.TCMSEnvPropertyFactory(name='f26')
Example #13
0
    def setUpTestData(cls):
        super().setUpTestData()
        user_should_have_perm(cls.tester, 'management.change_tcmsenvvalue')
        cls.set_status_url = reverse('management-set-env-property-values-status')

        cls.property_db = f.TCMSEnvPropertyFactory(name='db')
        cls.value_mysql = f.TCMSEnvValueFactory(
            value='mysql', is_active=False, property=cls.property_db)
        cls.value_pgsql = f.TCMSEnvValueFactory(
            value='pgsql', is_active=False, property=cls.property_db)
        cls.value_mariadb = f.TCMSEnvValueFactory(
            value='mariadb', property=cls.property_db)
Example #14
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)
Example #15
0
 def setUpTestData(cls):
     cls.property_py = f.TCMSEnvPropertyFactory(name='python')
     cls.py36 = f.TCMSEnvValueFactory(value='3.6', property=cls.property_py)
     cls.py37 = f.TCMSEnvValueFactory(value='3.7', property=cls.property_py)