Rename the import package app to fluksio
A wheel whose top-level module is `app` collides with anything else in a user's venv, so the package that is about to be published takes the name it is published under. Only the Python package moves; the repo, the Docker WORKDIR and the compose project keep theirs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+10
-10
@@ -18,11 +18,11 @@ from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlmodel import Session
|
||||
|
||||
from app.api.deps import decode_token, user_from_token
|
||||
from app.cloud import config as cloud_config
|
||||
from app.core.config import settings
|
||||
from app.flow.panels import PanelDef, PanelsConfig, write_config
|
||||
from app.models import User
|
||||
from fluksio.api.deps import decode_token, user_from_token
|
||||
from fluksio.cloud import config as cloud_config
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.flow.panels import PanelDef, PanelsConfig, write_config
|
||||
from fluksio.models import User
|
||||
from tests.utils.portal import ISSUER, portal_token
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ def test_adding_a_remote_user_maps_and_revokes(
|
||||
return_value={"user_id": "portal-user-9", "email": "remote@example.com"}
|
||||
),
|
||||
)
|
||||
with patch("app.api.routes.cloud.httpx.post", return_value=portal_reply) as post:
|
||||
with patch("fluksio.api.routes.cloud.httpx.post", return_value=portal_reply) as post:
|
||||
added = client.post(
|
||||
f"{settings.API_V1_STR}/cloud/users",
|
||||
headers=superuser_token_headers,
|
||||
@@ -224,7 +224,7 @@ def test_adding_a_remote_user_maps_and_revokes(
|
||||
resolved = user_from_token(db, theirs)
|
||||
assert resolved is not None and resolved.email == "remote@example.com"
|
||||
|
||||
with patch("app.api.routes.cloud.httpx.post", return_value=portal_reply):
|
||||
with patch("fluksio.api.routes.cloud.httpx.post", return_value=portal_reply):
|
||||
again = client.post(
|
||||
f"{settings.API_V1_STR}/cloud/users",
|
||||
headers=superuser_token_headers,
|
||||
@@ -233,7 +233,7 @@ def test_adding_a_remote_user_maps_and_revokes(
|
||||
assert again.status_code == 409
|
||||
|
||||
with patch(
|
||||
"app.api.routes.cloud.httpx.delete", return_value=Mock(status_code=200)
|
||||
"fluksio.api.routes.cloud.httpx.delete", return_value=Mock(status_code=200)
|
||||
) as delete:
|
||||
removed = client.delete(
|
||||
f"{settings.API_V1_STR}/users/{body['id']}", headers=superuser_token_headers
|
||||
@@ -279,7 +279,7 @@ def test_enrolling_against_a_portal_without_an_owner_is_refused(
|
||||
),
|
||||
)
|
||||
try:
|
||||
with patch("app.api.routes.cloud.httpx.AsyncClient") as client_cls:
|
||||
with patch("fluksio.api.routes.cloud.httpx.AsyncClient") as client_cls:
|
||||
client_cls.return_value.__aenter__.return_value.post = AsyncMock(
|
||||
return_value=reply
|
||||
)
|
||||
@@ -304,7 +304,7 @@ def test_an_older_enrolment_adopts_the_owner_on_attach(
|
||||
again, which for a machine reached only through the portal means standing in
|
||||
front of it.
|
||||
"""
|
||||
from app.cloud.connector import CloudConnector
|
||||
from fluksio.cloud.connector import CloudConnector
|
||||
|
||||
enrolled.portal_sub = None
|
||||
db.add(enrolled)
|
||||
|
||||
Reference in New Issue
Block a user