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

Method testMultipleLikes

isso/tests/test_vote.py:55–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 self.assertEqual(loads(rv.data)["likes"], 0)
54
55 def testMultipleLikes(self):
56 self.makeClient("127.0.0.1").post("/new?uri=test", data=json.dumps({"text": "..."}))
57 for num in range(15):
58 rv = self.makeClient("1.2.%i.0" % num).post("/id/1/like")
59 self.assertEqual(rv.status_code, 200)
60 self.assertEqual(loads(rv.data)["likes"], num + 1)
61
62 def testVoteOnNonexistentComment(self):
63 rv = self.makeClient("1.2.3.4").post("/id/1/like")

Callers

nothing calls this directly

Calls 3

makeClientMethod · 0.95
loadsFunction · 0.90
dumpsMethod · 0.80

Tested by

no test coverage detected