def test_get_bodies_from_pr_created_event(self): bodies = get_bodies(json.loads(PR_CREATED)) assert 1 == len(bodies) assert "This is the PR body" == bodies[0]
def test_get_bodies_from_pr_created_event(self): bodies = get_bodies(json.loads(PR_CREATED)) self.assertEqual(1, len(bodies)) self.assertEqual("This is the PR body", bodies[0])
def test_get_bodies_from_pr_comment_event(self): bodies = get_bodies(json.loads(PR_COMMENT_EVENT)) assert 2 == len(bodies) assert "This is the PR body" == bodies[0] assert "this is a comment" == bodies[1]
def test_get_bodies_from_pr_comment_event(self): bodies = get_bodies(json.loads(PR_COMMENT_EVENT)) self.assertEqual(2, len(bodies)) self.assertEqual("This is the PR body", bodies[0]) self.assertEqual("this is a comment", bodies[1])