diracx-testing 0.0.1a27__py3-none-any.whl → 0.0.1a29__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diracx/testing/utils.py +16 -8
- {diracx_testing-0.0.1a27.dist-info → diracx_testing-0.0.1a29.dist-info}/METADATA +1 -1
- {diracx_testing-0.0.1a27.dist-info → diracx_testing-0.0.1a29.dist-info}/RECORD +5 -5
- {diracx_testing-0.0.1a27.dist-info → diracx_testing-0.0.1a29.dist-info}/WHEEL +0 -0
- {diracx_testing-0.0.1a27.dist-info → diracx_testing-0.0.1a29.dist-info}/top_level.txt +0 -0
diracx/testing/utils.py
CHANGED
@@ -21,10 +21,15 @@ from uuid import uuid4
|
|
21
21
|
import httpx
|
22
22
|
import pytest
|
23
23
|
|
24
|
+
from diracx.core.models import AccessTokenPayload, RefreshTokenPayload
|
25
|
+
|
24
26
|
if TYPE_CHECKING:
|
25
|
-
from diracx.core.settings import
|
26
|
-
|
27
|
-
|
27
|
+
from diracx.core.settings import (
|
28
|
+
AuthSettings,
|
29
|
+
DevelopmentSettings,
|
30
|
+
SandboxStoreSettings,
|
31
|
+
)
|
32
|
+
from diracx.routers.utils.users import AuthorizedUserInfo
|
28
33
|
|
29
34
|
|
30
35
|
# to get a string like this run:
|
@@ -92,9 +97,10 @@ def test_dev_settings() -> Generator[DevelopmentSettings, None, None]:
|
|
92
97
|
def test_auth_settings(
|
93
98
|
private_key_pem, fernet_key
|
94
99
|
) -> Generator[AuthSettings, None, None]:
|
95
|
-
from diracx.
|
100
|
+
from diracx.core.settings import AuthSettings
|
96
101
|
|
97
102
|
yield AuthSettings(
|
103
|
+
token_issuer=ISSUER,
|
98
104
|
token_algorithm="EdDSA",
|
99
105
|
token_key=private_key_pem,
|
100
106
|
state_key=fernet_key,
|
@@ -128,7 +134,7 @@ def aio_moto(worker_id):
|
|
128
134
|
|
129
135
|
@pytest.fixture(scope="session")
|
130
136
|
def test_sandbox_settings(aio_moto) -> SandboxStoreSettings:
|
131
|
-
from diracx.
|
137
|
+
from diracx.core.settings import SandboxStoreSettings
|
132
138
|
|
133
139
|
yield SandboxStoreSettings(
|
134
140
|
bucket_name="sandboxes",
|
@@ -177,7 +183,9 @@ class ClientFactory:
|
|
177
183
|
pass
|
178
184
|
|
179
185
|
@staticmethod
|
180
|
-
def enrich_tokens(
|
186
|
+
def enrich_tokens(
|
187
|
+
access_payload: AccessTokenPayload, refresh_payload: RefreshTokenPayload
|
188
|
+
):
|
181
189
|
|
182
190
|
return {"PolicySpecific": "OpenAccessForTest"}, {}
|
183
191
|
|
@@ -186,13 +194,13 @@ class ClientFactory:
|
|
186
194
|
}
|
187
195
|
database_urls = {
|
188
196
|
e.name: "sqlite+aiosqlite:///:memory:"
|
189
|
-
for e in select_from_extension(group="diracx.
|
197
|
+
for e in select_from_extension(group="diracx.dbs.sql")
|
190
198
|
}
|
191
199
|
# TODO: Monkeypatch this in a less stupid way
|
192
200
|
# TODO: Only use this if opensearch isn't available
|
193
201
|
os_database_conn_kwargs = {
|
194
202
|
e.name: {"sqlalchemy_dsn": "sqlite+aiosqlite:///:memory:"}
|
195
|
-
for e in select_from_extension(group="diracx.
|
203
|
+
for e in select_from_extension(group="diracx.dbs.os")
|
196
204
|
}
|
197
205
|
BaseOSDB.available_implementations = partial(
|
198
206
|
fake_available_osdb_implementations,
|
@@ -4,8 +4,8 @@ diracx/testing/entrypoints.py,sha256=MbH0VLUQz96XPdHzb7XWFwYtWEitAqPrrGM1H1FzDLo
|
|
4
4
|
diracx/testing/mock_osdb.py,sha256=hHuvmQZ3212SaSGX11dQv4ki3ZWsmqJZFYwdn6kg2MA,6029
|
5
5
|
diracx/testing/osdb.py,sha256=m6mUBLnGOoQLTCIBie9P2GhmLMybrgzIrlIYfhF1_Ss,3230
|
6
6
|
diracx/testing/routers.py,sha256=UW-TnikMQgcNxF5sUZD5DWoucGiCpP6s8mYmuahDiSc,979
|
7
|
-
diracx/testing/utils.py,sha256=
|
8
|
-
diracx_testing-0.0.
|
9
|
-
diracx_testing-0.0.
|
10
|
-
diracx_testing-0.0.
|
11
|
-
diracx_testing-0.0.
|
7
|
+
diracx/testing/utils.py,sha256=V2Mcbz_bo2jNEgQB48v4cX_4tsXwX_U6InQspsvZ2E8,24552
|
8
|
+
diracx_testing-0.0.1a29.dist-info/METADATA,sha256=QBrVnz6qlvhmUWCaBXAeePfLu5RPcUDJESCjIXpto3M,634
|
9
|
+
diracx_testing-0.0.1a29.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
10
|
+
diracx_testing-0.0.1a29.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
|
11
|
+
diracx_testing-0.0.1a29.dist-info/RECORD,,
|
File without changes
|
File without changes
|