コード例 #1
0
ファイル: test_testcaserun.py プロジェクト: MrSenko/Nitrate
 def test_succeed_to_attach_bug_by_passing_extra_data(self):
     testcaserun.attach_bug(self.admin_request, {
         "case_run_id": self.case_run.pk,
         "bug_id": '1200',
         "bug_system_id": self.bug_system_bz.pk,
         "summary": "This is summary.",
         "description": "This is description.",
         "FFFF": "aaa"
     })
     bugs_added = self.case_run.case.case_bug.filter(
         bug_id='1200', bug_system=self.bug_system_bz.pk).count()
     self.assertEqual(1, bugs_added)
コード例 #2
0
 def test_succeed_to_attach_bug_by_passing_extra_data(self):
     testcaserun.attach_bug(
         self.admin_request, {
             "case_run_id": self.case_run.pk,
             "bug_id": '1200',
             "bug_system_id": self.bug_system_bz.pk,
             "summary": "This is summary.",
             "description": "This is description.",
             "FFFF": "aaa"
         })
     bugs_added = self.case_run.case.case_bug.filter(
         bug_id='1200', bug_system=self.bug_system_bz.pk).count()
     self.assertEqual(1, bugs_added)
コード例 #3
0
ファイル: test_testcaserun.py プロジェクト: MrSenko/Nitrate
    def setUpTestData(cls):
        cls.admin = UserFactory(username='******', email='*****@*****.**')
        cls.admin_request = make_http_request(user=cls.admin,
                                              user_perm='testcases.add_testcasebug')

        cls.case_run = TestCaseRunFactory()
        cls.bug_system_bz = TestCaseBugSystem.objects.get(name='Bugzilla')
        testcaserun.attach_bug(cls.admin_request, {
            'case_run_id': cls.case_run.pk,
            'bug_id': '67890',
            'bug_system_id': cls.bug_system_bz.pk,
            'summary': 'Testing TCMS',
            'description': 'Just foo and bar',
        })
コード例 #4
0
ファイル: test_testcaserun.py プロジェクト: MrSenko/Nitrate
    def test_attach_bug_with_required_args(self):
        bug = testcaserun.attach_bug(self.admin_request, {
            "case_run_id": self.case_run.pk,
            "bug_id": '1',
            "bug_system_id": self.bug_system_bz.pk,
        })
        self.assertIsNone(bug)

        bug = testcaserun.attach_bug(self.admin_request, {
            "case_run_id": self.case_run.pk,
            "bug_id": "TCMS-123",
            "bug_system_id": self.bug_system_jira.pk,
        })
        self.assertIsNone(bug)
コード例 #5
0
    def setUpTestData(cls):
        cls.admin = UserFactory()
        cls.admin_request = make_http_request(
            user=cls.admin, user_perm='testcases.add_testcasebug')

        cls.case_run = TestCaseRunFactory()
        cls.bug_system_bz = TestCaseBugSystem.objects.get(name='Bugzilla')
        testcaserun.attach_bug(
            cls.admin_request, {
                'case_run_id': cls.case_run.pk,
                'bug_id': '67890',
                'bug_system_id': cls.bug_system_bz.pk,
                'summary': 'Testing TCMS',
                'description': 'Just foo and bar',
            })
コード例 #6
0
    def test_attach_bug_with_required_args(self):
        bug = testcaserun.attach_bug(
            self.admin_request, {
                "case_run_id": self.case_run.pk,
                "bug_id": '1',
                "bug_system_id": self.bug_system_bz.pk,
            })
        self.assertIsNone(bug)

        bug = testcaserun.attach_bug(
            self.admin_request, {
                "case_run_id": self.case_run.pk,
                "bug_id": "TCMS-123",
                "bug_system_id": self.bug_system_jira.pk,
            })
        self.assertIsNone(bug)
コード例 #7
0
ファイル: test_testcaserun.py プロジェクト: MrSenko/Nitrate
    def setUp(self):
        self.bug_id = '67890'
        testcaserun.attach_bug(self.staff_request, {
            'case_run_id': self.case_run.pk,
            'bug_id': self.bug_id,
            'bug_system_id': self.bug_system_bz.pk,
            'summary': 'Testing TCMS',
            'description': 'Just foo and bar',
        })

        self.jira_key = 'AWSDF-112'
        testcaserun.attach_bug(self.staff_request, {
            'case_run_id': self.case_run.pk,
            'bug_id': self.jira_key,
            'bug_system_id': self.bug_system_jira.pk,
            'summary': 'Testing TCMS',
            'description': 'Just foo and bar',
        })
コード例 #8
0
ファイル: test_testcaserun.py プロジェクト: MrSenko/Nitrate
 def test_attach_bug_with_chinese(self):
     bug = testcaserun.attach_bug(self.admin_request, {
         "case_run_id": self.case_run.pk,
         "bug_id": '12',
         "bug_system_id": self.bug_system_bz.pk,
         "summary": "你好,中国",
         "description": "中国是一个具有悠久历史的文明古国"
     })
     self.assertIsNone(bug)
コード例 #9
0
ファイル: test_testcaserun.py プロジェクト: MrSenko/Nitrate
 def test_attach_bug_with_all_fields(self):
     bug = testcaserun.attach_bug(self.admin_request, {
         "case_run_id": self.case_run.pk,
         "bug_id": '2',
         "bug_system_id": self.bug_system_bz.pk,
         "summary": "This is summary.",
         "description": "This is description."
     })
     self.assertIsNone(bug)
コード例 #10
0
 def test_attach_bug_with_chinese(self):
     bug = testcaserun.attach_bug(
         self.admin_request, {
             "case_run_id": self.case_run.pk,
             "bug_id": '12',
             "bug_system_id": self.bug_system_bz.pk,
             "summary": "你好,中国",
             "description": "中国是一个具有悠久历史的文明古国"
         })
     self.assertIsNone(bug)
コード例 #11
0
 def test_attach_bug_with_all_fields(self):
     bug = testcaserun.attach_bug(
         self.admin_request, {
             "case_run_id": self.case_run.pk,
             "bug_id": '2',
             "bug_system_id": self.bug_system_bz.pk,
             "summary": "This is summary.",
             "description": "This is description."
         })
     self.assertIsNone(bug)
コード例 #12
0
    def setUp(self):
        self.bug_id = '67890'
        testcaserun.attach_bug(
            self.staff_request, {
                'case_run_id': self.case_run.pk,
                'bug_id': self.bug_id,
                'bug_system_id': self.bug_system_bz.pk,
                'summary': 'Testing TCMS',
                'description': 'Just foo and bar',
            })

        self.jira_key = 'AWSDF-112'
        testcaserun.attach_bug(
            self.staff_request, {
                'case_run_id': self.case_run.pk,
                'bug_id': self.jira_key,
                'bug_system_id': self.bug_system_jira.pk,
                'summary': 'Testing TCMS',
                'description': 'Just foo and bar',
            })