prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Mockserver server.py does not work in Python 3
  ```mockserver_1  | Traceback (most recent call last):
  mockserver_1  |   File "../server.py", line 5, in <module>
  mockserver_1  |     from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer
  mockserver_1  | ModuleNotFoundError: No module named 'SimpleHTTPServer'
  ```
  Looks like some modules have been reorganized in Python 3.  Hopefully this is just a matter of updating the imports.
  
  </issue>
  <code>
  [start of mockserver/server.py]
  1 #! /usr/bin/env python
  2 
  3 # Usage: python __file__.py <port>
  4 
  5 from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer
  6 
  7 class CORSRequestHandler(SimpleHTTPRequestHandler):
  8     def do_OPTIONS(self):
  9         self.send_response(200, 'OK')
  10         self.end_headers()
  11 
  12     def end_headers(self):
  13         self.send_header('Access-Control-Allow-Origin', '*')
  14         self.send_header('Access-Control-Allow-Headers', 'x-request-timestamp, x-signature, electricitymap-token')
  15         SimpleHTTPRequestHandler.end_headers(self)
  16 
  17 if __name__ == '__main__':
  18     BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer)
  19
  [end of mockserver/server.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/mockserver/server.py b/mockserver/server.py
  --- a/mockserver/server.py
  +++ b/mockserver/server.py
  @@ -2,7 +2,7 @@
   
   # Usage: python __file__.py <port>
   
  -from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer
  +from http.server import SimpleHTTPRequestHandler, HTTPServer, test
   
   class CORSRequestHandler(SimpleHTTPRequestHandler):
       def do_OPTIONS(self):
  @@ -15,4 +15,4 @@
           SimpleHTTPRequestHandler.end_headers(self)
   
   if __name__ == '__main__':
  -    BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer)
  +    test(CORSRequestHandler, HTTPServer)
  
verification_info: {"golden_diff": "diff --git a/mockserver/server.py b/mockserver/server.py\n--- a/mockserver/server.py\n+++ b/mockserver/server.py\n@@ -2,7 +2,7 @@\n \n # Usage: python __file__.py <port>\n \n-from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer\n+from http.server import SimpleHTTPRequestHandler, HTTPServer, test\n \n class CORSRequestHandler(SimpleHTTPRequestHandler):\n     def do_OPTIONS(self):\n@@ -15,4 +15,4 @@\n         SimpleHTTPRequestHandler.end_headers(self)\n \n if __name__ == '__main__':\n-    BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer)\n+    test(CORSRequestHandler, HTTPServer)\n", "issue": "Mockserver server.py does not work in Python 3\n```mockserver_1  | Traceback (most recent call last):\r\nmockserver_1  |   File \"../server.py\", line 5, in <module>\r\nmockserver_1  |     from SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer\r\nmockserver_1  | ModuleNotFoundError: No module named 'SimpleHTTPServer'\r\n```\r\nLooks like some modules have been reorganized in Python 3.  Hopefully this is just a matter of updating the imports.\n", "before_files": [{"content": "#! /usr/bin/env python\n\n# Usage: python __file__.py <port>\n\nfrom SimpleHTTPServer import SimpleHTTPRequestHandler, BaseHTTPServer\n\nclass CORSRequestHandler(SimpleHTTPRequestHandler):\n    def do_OPTIONS(self):\n        self.send_response(200, 'OK')\n        self.end_headers()\n\n    def end_headers(self):\n        self.send_header('Access-Control-Allow-Origin', '*')\n        self.send_header('Access-Control-Allow-Headers', 'x-request-timestamp, x-signature, electricitymap-token')\n        SimpleHTTPRequestHandler.end_headers(self)\n\nif __name__ == '__main__':\n    BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer)\n", "path": "mockserver/server.py"}]}