def test_edit_comment(self): r = YayAPIClient.register(self.opts, 'testeditcomment1', '*****@*****.**', 'a', 'a') r = YayAPIClient.post_thread(self.opts, r.cookies, 1, 'testeditcomment1 1', 'testeditcomment1 1 body') j = json.loads(r.content) r = YayAPIClient.post_comment(self.opts, r.cookies, j['thread_id'], 'testeditcomment1 1 reply') j = json.loads(r.content) r = YayAPIClient.edit_comment(self.opts, r.cookies, j['comment_id'], 'testeditcomment1 1 reply edit') j = json.loads(r.content) self.assertEqual(r.status_code, 201) self.assertTrue('comment_id' in j) self.assertTrue('thread_id' in j)