Ejemplo n.º 1
0
 def new_mocked_get(**options):
     return Response({
         "bugs": [{
             "status": "RESOLVED",
             "resolution": "",
             "id": 123456789,
             "summary": "Some summary",
         }]
     })
Ejemplo n.º 2
0
 def mocked_get(url, **options):
     assert url.startswith(settings.BZAPI_BASE_URL)
     return Response({
         'bugs': [{
             'id': 123456789,
             'status': 'NEW',
             'resolution': '',
             'summary': 'Some Summary',
         }],
     })
Ejemplo n.º 3
0
 def mocked_get(url, **options):
     assert url.startswith(settings.BZAPI_BASE_URL)
     return Response({
         "bugs": [{
             "id": 123456789,
             "status": "NEW",
             "resolution": "",
             "summary": "Some Summary",
         }]
     })
Ejemplo n.º 4
0
 def new_mocked_get(**options):
     return Response({
         'bugs': [
             {
                 'status': 'RESOLVED',
                 'resolution': '',
                 'id': 123456789,
                 'summary': 'Some summary'
             },
         ]
     })
Ejemplo n.º 5
0
 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",
         }]
     })
Ejemplo n.º 6
0
 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'
             },
         ]
     })
Ejemplo n.º 7
0
 def mocked_get(url, **options):
     return Response("I'm a teapot", status_code=418)