MCPcopy
hub / github.com/isso-comments/isso / testAddComment

Method testAddComment

isso/tests/test_comments.py:747–758  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

745 os.unlink(self.path)
746
747 def testAddComment(self):
748 rv = self.client.post("/new?uri=test", data=json.dumps({"text": "..."}))
749 self.assertEqual(rv.status_code, 202)
750
751 self.assertEqual(self.client.get("/id/1").status_code, 200)
752 self.assertEqual(self.client.get("/?uri=test").status_code, 200)
753
754 data = loads(self.client.get("/?uri=test").data)
755 self.assertEqual(len(data["replies"]), 0)
756
757 self.app.db.comments.activate(1)
758 self.assertEqual(self.client.get("/?uri=test").status_code, 200)
759
760 def testModerateComment(self):
761 id_ = 1

Callers

nothing calls this directly

Calls 4

loadsFunction · 0.90
dumpsMethod · 0.80
activateMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected