testflows.machine 0.1.4__tar.gz → 0.1.5__tar.gz
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.
- {testflows_machine-0.1.4/testflows.machine.egg-info → testflows_machine-0.1.5}/PKG-INFO +1 -1
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_version.py +1 -1
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/errors.py +4 -1
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/login.py +7 -2
- {testflows_machine-0.1.4 → testflows_machine-0.1.5/testflows.machine.egg-info}/PKG-INFO +1 -1
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/LICENSE +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/NOTICE +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/README.md +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/pyproject.toml +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/setup.cfg +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/__init__.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_args.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_requires.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_service.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_warn.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_when.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/client.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/disks.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/ping.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/results.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/runs.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/sessions.py +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/SOURCES.txt +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/dependency_links.txt +0 -0
- {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/top_level.txt +0 -0
|
@@ -25,6 +25,7 @@ import contextlib
|
|
|
25
25
|
from typing import Generator, Optional
|
|
26
26
|
|
|
27
27
|
from testflows.machine._core import api
|
|
28
|
+
from testflows.machine._core import build
|
|
28
29
|
from testflows.machine._core import disks
|
|
29
30
|
from testflows.machine._core import ipc
|
|
30
31
|
from testflows.machine._core import refused
|
|
@@ -43,7 +44,8 @@ class Error(Exception):
|
|
|
43
44
|
|
|
44
45
|
class NotSignedIn(Error):
|
|
45
46
|
"""There are no credentials: no stored login and no
|
|
46
|
-
TESTFLOWS_MACHINE_API_KEY.
|
|
47
|
+
TESTFLOWS_MACHINE_API_KEY. Also raised for an `api_url` that is not the
|
|
48
|
+
service the stored login signed in to: its credentials are not sent there.
|
|
47
49
|
|
|
48
50
|
Sign in with `login.start` and `login.verify`, or `machine login`, or
|
|
49
51
|
set TESTFLOWS_MACHINE_API_KEY.
|
|
@@ -162,6 +164,7 @@ _MAPPING: tuple[tuple[type[BaseException], type[Error]], ...] = (
|
|
|
162
164
|
(_sessions.NameTaken, AlreadyExists),
|
|
163
165
|
(_sessions.Unreachable, ServiceUnavailable),
|
|
164
166
|
(disks.NotFound, NotFound),
|
|
167
|
+
(build.BuildError, InvalidArgument),
|
|
165
168
|
(api.client.NotFound, NotFound),
|
|
166
169
|
(api.client.Conflict, Conflict),
|
|
167
170
|
(api.client.Forbidden, Forbidden),
|
|
@@ -95,12 +95,17 @@ def logout(*, everywhere: bool = False, api_url: Optional[str] = None) -> bool:
|
|
|
95
95
|
Args:
|
|
96
96
|
everywhere (bool, optional): Sign out every login of the account,
|
|
97
97
|
on every machine. Defaults to False.
|
|
98
|
-
api_url (str, optional): The service
|
|
99
|
-
|
|
98
|
+
api_url (str, optional): The service the caller expects the login
|
|
99
|
+
to be for. The sign-out always goes to the login's own service;
|
|
100
|
+
another one is refused.
|
|
100
101
|
|
|
101
102
|
Returns:
|
|
102
103
|
bool: True when the service revoked the login; False when there was
|
|
103
104
|
none, or the service could not be told.
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
NotSignedIn: `api_url` is not the service the login signed in to.
|
|
108
|
+
The login is kept, and its credentials are not sent there.
|
|
104
109
|
"""
|
|
105
110
|
with _translated():
|
|
106
111
|
out = _login.logout(api_url, everywhere=everywhere)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/top_level.txt
RENAMED
|
File without changes
|