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

Method testCreateAndGetMultiple

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

Source from the content-addressed store, hash-verified

99 self.assertEqual(loads(c.data)["id"], 3)
100
101 def testCreateAndGetMultiple(self):
102 for i in range(20):
103 self.post("/new?uri=%2Fpath%2F", data=json.dumps({"text": "Spam"}))
104
105 r = self.get("/?uri=%2Fpath%2F")
106 self.assertEqual(r.status_code, 200)
107
108 rv = loads(r.data)
109 self.assertEqual(len(rv["replies"]), 20)
110 self.assertEqual(rv["total_replies"], 20)
111
112 def testCreateInvalidParent(self):
113 self.post("/new?uri=test", data=json.dumps({"text": "..."}))

Callers

nothing calls this directly

Calls 3

loadsFunction · 0.90
dumpsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected