def test_post_with_issue(self):
        diff_comment_text = 'Test diff comment with an opened issue'

        review_request, filediff = self._create_diff_review_request()
        review = self.create_review(review_request, user=self.user)
        rsp = self.api_post(
            get_review_diff_comment_list_url(review),
            {
                'filediff_id': filediff.pk,
                'issue_opened': True,
                'first_line': 1,
                'num_lines': 5,
                'text': diff_comment_text,
            },
            expected_mimetype=review_diff_comment_item_mimetype)

        self.assertEqual(rsp['stat'], 'ok')
        self.assertIn('diff_comment', rsp)
        self.assertEqual(rsp['diff_comment']['text'], diff_comment_text)
        self.assertTrue(rsp['diff_comment']['issue_opened'])
Testing the
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/tests/test_review_comment.py/ResourceListTests.test_post_with_issue