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

Method test_get

tests/test_http_raw.py:15–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 self.hack = HackRequests.hackRequests()
14
15 def test_get(self):
16 raw = '''
17GET /get?a=1&b=2&c=heloo HTTP/1.1
18Host: httpbin.org
19Connection: keep-alive
20Upgrade-Insecure-Requests: 1
21User-Agent: celebrate hack-requests 1.0 !
22Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
23Accept-Encoding: gzip, deflate
24Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
25Cookie: _gauges_unique_hour=1; _gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1
26 '''
27 r = self.hack.httpraw(raw)
28 self.assertTrue(json.loads(r.text())["args"] == {"a": "1", "b": "2", "c": "heloo"})
29
30 def test_post(self):
31 raw = '''

Callers

nothing calls this directly

Calls 2

textMethod · 0.80
httprawMethod · 0.45

Tested by

no test coverage detected