mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Moved MockRequest to tests/utils.py
This commit is contained in:
parent
dae6f0c4d8
commit
8310ad2336
2 changed files with 8 additions and 9 deletions
7
tests/utils.py
Normal file
7
tests/utils.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class MockRequest:
|
||||
def __init__(self, url):
|
||||
self.url = url
|
||||
self.path = "/" + url.split("://")[1].split("/", 1)[1]
|
||||
self.query_string = ""
|
||||
if "?" in url:
|
||||
self.query_string = url.split("?", 1)[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue