Exemplo n.º 1
0
    def test_get_bugs_count(self):
        # Add bugs to executions, which are part of cls.test_run
        LinkReferenceFactory(execution=self.execution_1)
        LinkReferenceFactory(execution=self.execution_2)
        LinkReferenceFactory(execution=self.execution_3)

        self.assertEqual(3, self.test_run.get_bug_count())
Exemplo n.º 2
0
    def setUpTestData(cls):
        super().setUpTestData()
        user_should_have_perm(cls.tester, 'testruns.view_testrun')

        cls.bug_1 = LinkReferenceFactory(execution=cls.execution_1)
        cls.bug_2 = LinkReferenceFactory(execution=cls.execution_2)
        cls.bug_3 = LinkReferenceFactory(execution=cls.execution_3)
Exemplo n.º 3
0
    def test_user_sees_bugs(self):
        bug_1 = LinkReferenceFactory(execution=self.execution_1)
        bug_2 = LinkReferenceFactory(execution=self.execution_1)

        url = reverse('execution-detail-pane', args=[self.execution_1.case.pk])
        response = self.client.get(
            url, {
                'case_run_id':
                self.execution_1.pk,
                'case_text_version':
                self.execution_1.case.history.latest().history_id,
            })

        self.assertEqual(HTTPStatus.OK, response.status_code)
        self.assertContains(response, bug_1.url)
        self.assertContains(response, bug_2.url)
Exemplo n.º 4
0
    def _fixture_setup(self):
        super()._fixture_setup()

        self.execution = TestExecutionFactory()
        self.link = LinkReferenceFactory(execution=self.execution)
        self.another_link = LinkReferenceFactory(execution=self.execution)
Exemplo n.º 5
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.bug_1 = LinkReferenceFactory(execution=cls.execution_1)
        cls.bug_2 = LinkReferenceFactory(execution=cls.execution_2)
        cls.bug_3 = LinkReferenceFactory(execution=cls.execution_3)