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

Method test_post

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

Source from the content-addressed store, hash-verified

17 self.assertTrue(json.loads(r.text())["args"] == {"a": "1", "b": "2", "c": "heloo"})
18
19 def test_post(self):
20 data = "a=1&b=2&c=heloo"
21 r = self.hack.http("http://httpbin.org/post", post=data)
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"}'

Callers

nothing calls this directly

Calls 2

textMethod · 0.80
httpMethod · 0.45

Tested by

no test coverage detected