(self)
| 223 | self.assertTrue("not authorized" in str(e)) |
| 224 | |
| 225 | def test_good_response(self): |
| 226 | model = JsonModel(data_wrapper=True) |
| 227 | resp = httplib2.Response({"status": "200"}) |
| 228 | resp.reason = "OK" |
| 229 | content = '{"data": "is good"}' |
| 230 | |
| 231 | content = model.response(resp, content) |
| 232 | self.assertEqual(content, "is good") |
| 233 | |
| 234 | def test_good_response_wo_data(self): |
| 235 | model = JsonModel(data_wrapper=False) |