MCPcopy Create free account
hub / github.com/boy-hack/hack-requests / test_json

Method test_json

tests/test_http.py:24–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.assertTrue(json.loads(r.text())["form"] == {"a": "1", "b": "2", "c": "heloo"})
23
24 def test_json(self):
25 data = '{"hack-requests":"v1.0","author":"w8ay"}'
26 r = self.hack.http("http://httpbin.org/post", post=data)
27 self.assertTrue("hack-requests" in r.text())
28
29 def test_localhost(self):
30 headers = {

Callers

nothing calls this directly

Calls 2

textMethod · 0.80
httpMethod · 0.45

Tested by

no test coverage detected