We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18cc70f commit a71b765Copy full SHA for a71b765
tests/tests_auth.py
@@ -1,4 +1,4 @@
1
-import os
+from pathlib import Path
2
3
import test_utils
4
from starlette.requests import Request
@@ -106,9 +106,9 @@ class FileAuthTests(test_utils.AsyncTestCase):
106
def setUp(self) -> None:
107
super().setUp()
108
109
- my_dir = os.path.abspath(os.path.dirname(__file__))
+ self.auth_fixture = Path(__file__).parent / "fixtures/auth-file.yml"
110
111
- self.backend = FileBackend(path=os.path.join(my_dir, "fixtures", "auth-file.yml"))
+ self.backend = FileBackend(path=str(self.auth_fixture))
112
113
def test_ok(self) -> None:
114
scopes, user = self.await_(self.backend.validate('ABC', 'password1'))
0 commit comments