| Conditions | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # -*- coding: utf-8 -*- |
||
| 26 | def fake_endpoint(self, api, endpoint, method=httpretty.GET, |
||
| 27 | body=None, status=200): |
||
| 28 | |||
| 29 | if not callable(body): |
||
| 30 | body = json.dumps(body) |
||
| 31 | |||
| 32 | httpretty.register_uri( |
||
| 33 | method, |
||
| 34 | urljoin(api.get_api_url(), endpoint), |
||
| 35 | body=body, |
||
| 36 | content_type='application/json', |
||
| 37 | status=status |
||
| 38 | ) |
||
| 39 |