コード例 #1
0
ファイル: test_models.py プロジェクト: kazpanda/PythonDjango
    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())
コード例 #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)
コード例 #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)
コード例 #4
0
ファイル: test_testexecution.py プロジェクト: valghar/Kiwi
    def _fixture_setup(self):
        super()._fixture_setup()

        self.execution = TestExecutionFactory()
        self.link = LinkReferenceFactory(execution=self.execution)
        self.another_link = LinkReferenceFactory(execution=self.execution)
コード例 #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)