prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  __flush__ produces an HTML reponse 
  The response for the flush endpoint is a raw HTML response from Pyramid. I suggest make it a JSON response for compatibility with the rest of the API. Maybe return `{}`?
  
  ```
  gsurita-30820:kinto gsurita$ http post http://localhost:8888/v1/__flush__
  HTTP/1.1 202 Accepted
  Content-Length: 157
  Content-Type: text/html; charset=UTF-8
  Date: Tue, 21 Feb 2017 13:56:56 GMT
  Server: waitress
  X-Content-Type-Options: nosniff
  
  <html>
   <head>
    <title>202 Accepted</title>
   </head>
   <body>
    <h1>202 Accepted</h1>
    The request is accepted for processing.<br/><br/>
  
  
  
   </body>
  </html>
  __flush__ produces an HTML reponse 
  The response for the flush endpoint is a raw HTML response from Pyramid. I suggest make it a JSON response for compatibility with the rest of the API. Maybe return `{}`?
  
  ```
  gsurita-30820:kinto gsurita$ http post http://localhost:8888/v1/__flush__
  HTTP/1.1 202 Accepted
  Content-Length: 157
  Content-Type: text/html; charset=UTF-8
  Date: Tue, 21 Feb 2017 13:56:56 GMT
  Server: waitress
  X-Content-Type-Options: nosniff
  
  <html>
   <head>
    <title>202 Accepted</title>
   </head>
   <body>
    <h1>202 Accepted</h1>
    The request is accepted for processing.<br/><br/>
  
  
  
   </body>
  </html>
  
  </issue>
  <code>
  [start of kinto/views/flush.py]
  1 from cornice import Service
  2 from pyramid import httpexceptions
  3 from pyramid.security import NO_PERMISSION_REQUIRED
  4 
  5 from kinto.events import ServerFlushed
  6 
  7 flush = Service(name='flush',
  8                 description='Clear database content',
  9                 path='/__flush__')
  10 
  11 
  12 @flush.post(permission=NO_PERMISSION_REQUIRED)
  13 def flush_post(request):
  14     request.registry.storage.flush()
  15     request.registry.permission.flush()
  16     request.registry.cache.flush()
  17     event = ServerFlushed(request)
  18     request.registry.notify(event)
  19     return httpexceptions.HTTPAccepted()
  20
  [end of kinto/views/flush.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/kinto/views/flush.py b/kinto/views/flush.py
  --- a/kinto/views/flush.py
  +++ b/kinto/views/flush.py
  @@ -1,5 +1,4 @@
   from cornice import Service
  -from pyramid import httpexceptions
   from pyramid.security import NO_PERMISSION_REQUIRED
   
   from kinto.events import ServerFlushed
  @@ -16,4 +15,6 @@
       request.registry.cache.flush()
       event = ServerFlushed(request)
       request.registry.notify(event)
  -    return httpexceptions.HTTPAccepted()
  +
  +    request.response.status = 202
  +    return {}
  
verification_info: {"golden_diff": "diff --git a/kinto/views/flush.py b/kinto/views/flush.py\n--- a/kinto/views/flush.py\n+++ b/kinto/views/flush.py\n@@ -1,5 +1,4 @@\n from cornice import Service\n-from pyramid import httpexceptions\n from pyramid.security import NO_PERMISSION_REQUIRED\n \n from kinto.events import ServerFlushed\n@@ -16,4 +15,6 @@\n     request.registry.cache.flush()\n     event = ServerFlushed(request)\n     request.registry.notify(event)\n-    return httpexceptions.HTTPAccepted()\n+\n+    request.response.status = 202\n+    return {}\n", "issue": "__flush__ produces an HTML reponse \nThe response for the flush endpoint is a raw HTML response from Pyramid. I suggest make it a JSON response for compatibility with the rest of the API. Maybe return `{}`?\r\n\r\n```\r\ngsurita-30820:kinto gsurita$ http post http://localhost:8888/v1/__flush__\r\nHTTP/1.1 202 Accepted\r\nContent-Length: 157\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Tue, 21 Feb 2017 13:56:56 GMT\r\nServer: waitress\r\nX-Content-Type-Options: nosniff\r\n\r\n<html>\r\n <head>\r\n  <title>202 Accepted</title>\r\n </head>\r\n <body>\r\n  <h1>202 Accepted</h1>\r\n  The request is accepted for processing.<br/><br/>\r\n\r\n\r\n\r\n </body>\r\n</html>\n__flush__ produces an HTML reponse \nThe response for the flush endpoint is a raw HTML response from Pyramid. I suggest make it a JSON response for compatibility with the rest of the API. Maybe return `{}`?\r\n\r\n```\r\ngsurita-30820:kinto gsurita$ http post http://localhost:8888/v1/__flush__\r\nHTTP/1.1 202 Accepted\r\nContent-Length: 157\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Tue, 21 Feb 2017 13:56:56 GMT\r\nServer: waitress\r\nX-Content-Type-Options: nosniff\r\n\r\n<html>\r\n <head>\r\n  <title>202 Accepted</title>\r\n </head>\r\n <body>\r\n  <h1>202 Accepted</h1>\r\n  The request is accepted for processing.<br/><br/>\r\n\r\n\r\n\r\n </body>\r\n</html>\n", "before_files": [{"content": "from cornice import Service\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.events import ServerFlushed\n\nflush = Service(name='flush',\n                description='Clear database content',\n                path='/__flush__')\n\n\n@flush.post(permission=NO_PERMISSION_REQUIRED)\ndef flush_post(request):\n    request.registry.storage.flush()\n    request.registry.permission.flush()\n    request.registry.cache.flush()\n    event = ServerFlushed(request)\n    request.registry.notify(event)\n    return httpexceptions.HTTPAccepted()\n", "path": "kinto/views/flush.py"}]}