예제 #1
0
    def setUpTestData(cls):

        cls.plan = factories.TestPlanFactory()

        cls.build_fast = factories.BuildFactory(
            name="fast", version=cls.plan.product_version
        )

        cls.post_data = {
            "summary": cls.plan.name,
            "plan": cls.plan.pk,
            "build": cls.build_fast.pk,
            "notes": "Create new test run",
            "product_version": cls.plan.product_version.pk,
        }

        super().setUpTestData()

        cls.post_data["manager"] = cls.tester.email
        cls.post_data["default_tester"] = cls.tester.email

        case_status_confirmed = TestCaseStatus.objects.filter(is_confirmed=True).first()

        cls.case_1 = factories.TestCaseFactory(
            author=cls.tester,
            default_tester=None,
            reviewer=cls.tester,
            case_status=case_status_confirmed,
            plan=[cls.plan],
        )
        cls.case_1.save()  # will generate history object

        cls.case_2 = factories.TestCaseFactory(
            author=cls.tester,
            default_tester=None,
            reviewer=cls.tester,
            case_status=case_status_confirmed,
            plan=[cls.plan],
        )
        cls.case_2.save()  # will generate history object

        cls.post_data["case"] = [cls.case_1.pk, cls.case_2.pk]
예제 #2
0
    def setUpTestData(cls):

        cls.plan = factories.TestPlanFactory()

        cls.build_fast = factories.BuildFactory(name='fast',
                                                product=cls.plan.product)

        cls.post_data = {
            'summary': cls.plan.name,
            'from_plan': cls.plan.pk,
            'build': cls.build_fast.pk,
            'notes': 'Create new test run',
            'POSTING_TO_CREATE': 'YES',
        }

        super().setUpTestData()

        cls.post_data['manager'] = cls.tester.email
        cls.post_data['default_tester'] = cls.tester.email

        case_status_confirmed = TestCaseStatus.get_confirmed()

        cls.case_1 = factories.TestCaseFactory(
            author=cls.tester,
            default_tester=None,
            reviewer=cls.tester,
            case_status=case_status_confirmed,
            plan=[cls.plan])
        cls.case_1.save()  # will generate history object

        cls.case_2 = factories.TestCaseFactory(
            author=cls.tester,
            default_tester=None,
            reviewer=cls.tester,
            case_status=case_status_confirmed,
            plan=[cls.plan])
        cls.case_2.save()  # will generate history object

        cls.post_data['case'] = [cls.case_1.pk, cls.case_2.pk]