| 28 | self.assertTrue(json.loads(r.text())["args"] == {"a": "1", "b": "2", "c": "heloo"}) |
| 29 | |
| 30 | def test_post(self): |
| 31 | raw = ''' |
| 32 | POST /post HTTP/1.1 |
| 33 | Host: httpbin.org |
| 34 | Connection: keep-alive |
| 35 | Upgrade-Insecure-Requests: 1 |
| 36 | User-Agent: celebrate hack-requests 1.0 ! |
| 37 | Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 |
| 38 | Accept-Encoding: gzip, deflate |
| 39 | Accept-Language: zh-CN,zh;q=0.9,en;q=0.8 |
| 40 | Cookie: _gauges_unique_hour=1; _gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1 |
| 41 | |
| 42 | a=1&b=2&c=heloo |
| 43 | ''' |
| 44 | r = self.hack.httpraw(raw) |
| 45 | self.assertTrue("a=1&b=2&c=heloo" in r.text()) |
| 46 | |
| 47 | def test_json(self): |
| 48 | raw = ''' |