def new_mocked_get(**options): return Response({ "bugs": [{ "status": "RESOLVED", "resolution": "", "id": 123456789, "summary": "Some summary", }] })
def mocked_get(url, **options): assert url.startswith(settings.BZAPI_BASE_URL) return Response({ 'bugs': [{ 'id': 123456789, 'status': 'NEW', 'resolution': '', 'summary': 'Some Summary', }], })
def mocked_get(url, **options): assert url.startswith(settings.BZAPI_BASE_URL) return Response({ "bugs": [{ "id": 123456789, "status": "NEW", "resolution": "", "summary": "Some Summary", }] })
def new_mocked_get(**options): return Response({ 'bugs': [ { 'status': 'RESOLVED', 'resolution': '', 'id': 123456789, 'summary': 'Some summary' }, ] })
def mocked_get(url, **options): assert url.startswith(settings.BZAPI_BASE_URL) parsed = urlparse(url) query = parse_qs(parsed.query) assert query["include_fields"] == ["summary,status,id,resolution"] return Response({ "bugs": [{ "status": "NEW", "resolution": "", "id": 123456789, "summary": "Some summary", }] })
def mocked_get(url, **options): assert url.startswith(settings.BZAPI_BASE_URL) parsed = urlparse(url) query = parse_qs(parsed.query) assert query['include_fields'] == ['summary,status,id,resolution'] return Response({ 'bugs': [ { 'status': 'NEW', 'resolution': '', 'id': 123456789, 'summary': 'Some summary' }, ] })
def mocked_get(url, **options): return Response("I'm a teapot", status_code=418)