mirror of
https://github.com/ae-utbm/sith.git
synced 2025-11-22 12:46:58 +00:00
remove unused Mock
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from dataclasses import dataclass
|
||||
from datetime import timedelta
|
||||
from pathlib import Path
|
||||
|
||||
@@ -18,16 +17,6 @@ from core.markdown import markdown
|
||||
from core.models import User
|
||||
|
||||
|
||||
@dataclass
|
||||
class MockResponse:
|
||||
ok: bool
|
||||
value: str
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
return self.value.encode("utf8")
|
||||
|
||||
|
||||
def accel_redirect_to_file(response: HttpResponse) -> Path | None:
|
||||
redirect = Path(response.headers.get("X-Accel-Redirect", ""))
|
||||
if not redirect.is_relative_to(Path("/") / settings.MEDIA_ROOT.stem):
|
||||
|
||||
Reference in New Issue
Block a user