We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mockserver/server.py`
Content:
```
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 FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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)

{"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"}], "after_files": [{"content": "#! /usr/bin/env python\n\n# Usage: python __file__.py <port>\n\nfrom http.server import SimpleHTTPRequestHandler, HTTPServer, test\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    test(CORSRequestHandler, HTTPServer)\n", "path": "mockserver/server.py"}]}