Ejemplo n.º 1
0
    def setUpTestData(cls):
        cls.user = UserFactory(username='******', email='*****@*****.**')
        cls.user.set_password('admin')
        cls.user.is_superuser = True
        cls.user.is_staff = True
        cls.user.save()

        cls.classification = ClassificationFactory(name='Auto')
        cls.product = ProductFactory(name='Kiwi',
                                     classification=cls.classification)
        cls.product_version = VersionFactory(value='0.1', product=cls.product)
        cls.plan_type = PlanTypeFactory()

        cls.test_plan = TestPlanFactory(name='another test plan for testing',
                                        product_version=cls.product_version,
                                        owner=cls.user,
                                        author=cls.user,
                                        product=cls.product,
                                        type=cls.plan_type)
        # add TestCases to plan with status CONFIRMED
        for _i in range(5):
            case = TestCaseFactory(
                plan=[cls.test_plan],
                case_status=TestCaseStatus.objects.get(name='CONFIRMED'))
            TestCaseTextFactory(case=case)
Ejemplo n.º 2
0
Archivo: tests.py Proyecto: xbln/Kiwi
    def setUpTestData(cls):
        cls.user = UserFactory(username='******', email='*****@*****.**')
        cls.user.set_password('admin')
        cls.user.is_superuser = True
        cls.user.save()

        cls.c = Client()
        cls.c.login(username='******', password='******')

        cls.classification = ClassificationFactory(name='Auto')
        cls.product = ProductFactory(name='Kiwi',
                                     classification=cls.classification)
        cls.product_version = VersionFactory(value='0.1', product=cls.product)
        cls.plan_type = PlanTypeFactory()

        cls.test_plan = TestPlanFactory(name='another test plan for testing',
                                        product_version=cls.product_version,
                                        owner=cls.user,
                                        author=cls.user,
                                        product=cls.product,
                                        type=cls.plan_type)
        TestPlanTextFactory(plan=cls.test_plan)

        cls.plan_id = cls.test_plan.pk
        cls.child_plan = TestPlanFactory(parent=cls.test_plan)
Ejemplo n.º 3
0
    def setUpTestData(cls):
        cls.user = UserFactory(username="******", email="*****@*****.**")
        cls.user.set_password("admin")
        cls.user.is_superuser = True
        cls.user.is_staff = True
        cls.user.save()

        cls.classification = ClassificationFactory(name="Auto")
        cls.product = ProductFactory(name="Kiwi",
                                     classification=cls.classification)
        cls.product_version = VersionFactory(value="0.1", product=cls.product)
        cls.plan_type = PlanTypeFactory()

        cls.test_plan = TestPlanFactory(
            name="another test plan for testing",
            product_version=cls.product_version,
            author=cls.user,
            product=cls.product,
            type=cls.plan_type,
        )
        # add TestCases to plan with status CONFIRMED
        for _i in range(5):
            TestCaseFactory(
                plan=[cls.test_plan],
                case_status=TestCaseStatus.objects.get(name="CONFIRMED"),
            )

        # also add a few PROPOSED TestCases
        for _i in range(3):
            TestCaseFactory(plan=[cls.test_plan])

        cls.plan_id = cls.test_plan.pk
        cls.child_plan = TestPlanFactory(parent=cls.test_plan)
Ejemplo n.º 4
0
    def setUpTestData(cls):
        cls.user = UserFactory(username='******', email='*****@*****.**')
        cls.user.set_password('admin')
        cls.user.is_superuser = True
        cls.user.save()

        cls.c = Client()
        cls.c.login(  # nosec:B106:hardcoded_password_funcarg
            username='******',
            password='******')

        cls.classification = ClassificationFactory(name='Auto')
        cls.product = ProductFactory(name='Kiwi',
                                     classification=cls.classification)
        cls.product_version = VersionFactory(value='0.1', product=cls.product)
        cls.plan_type = PlanTypeFactory()

        cls.test_plan = TestPlanFactory(name='Test plan for testing exports',
                                        product_version=cls.product_version,
                                        owner=cls.user,
                                        author=cls.user,
                                        product=cls.product,
                                        type=cls.plan_type)

        # create test cases into the test plan
        cls.cases = []
        for i in range(10):
            case = TestCaseFactory(summary='test_case_number_%d' % i,
                                   author=cls.user,
                                   default_tester=None,
                                   reviewer=cls.user,
                                   plan=[cls.test_plan])
            tag = TagFactory(name='tag_for_%s' % case.summary)
            component = ComponentFactory(name='component_for_%s' %
                                         case.summary)
            case.add_tag(tag)
            case.add_component(component)

            if i % 2 == 0:
                tag = TagFactory(name='second_tag_for_%s' % case.summary)
                component = ComponentFactory(name='second_component_for_%s' %
                                             case.summary)
                case.add_tag(tag)
                case.add_component(component)

            cls.cases.append(case)
Ejemplo n.º 5
0
    def _fixture_setup(self):
        super()._fixture_setup()

        self.classification = ClassificationFactory()