Fix formatting in tests
Apply black to tests.
This commit is contained in:
parent
d21d14176e
commit
cb1054f841
@ -167,7 +167,6 @@ def create_key_revocation(
|
|||||||
def decorator(decorated_func: Callable[..., None]) -> Callable[..., Any]:
|
def decorator(decorated_func: Callable[..., None]) -> Callable[..., Any]:
|
||||||
@wraps(decorated_func)
|
@wraps(decorated_func)
|
||||||
def wrapper(working_dir: Path, *args: Any, **kwargs: Any) -> None:
|
def wrapper(working_dir: Path, *args: Any, **kwargs: Any) -> None:
|
||||||
|
|
||||||
revocation = test_key_revocation[username][0]
|
revocation = test_key_revocation[username][0]
|
||||||
|
|
||||||
keyring_root: Path = working_dir / "keyring"
|
keyring_root: Path = working_dir / "keyring"
|
||||||
@ -199,7 +198,6 @@ def create_signature_revocation(
|
|||||||
def decorator(decorated_func: Callable[..., None]) -> Callable[..., Any]:
|
def decorator(decorated_func: Callable[..., None]) -> Callable[..., Any]:
|
||||||
@wraps(decorated_func)
|
@wraps(decorated_func)
|
||||||
def wrapper(working_dir: Path, *args: Any, **kwargs: Any) -> None:
|
def wrapper(working_dir: Path, *args: Any, **kwargs: Any) -> None:
|
||||||
|
|
||||||
issuer_key: Path = test_keys[issuer][0]
|
issuer_key: Path = test_keys[issuer][0]
|
||||||
keyring_root: Path = working_dir / "keyring"
|
keyring_root: Path = working_dir / "keyring"
|
||||||
|
|
||||||
|
@ -640,7 +640,6 @@ def test_get_packets_from_path(working_dir: Path, keyring_dir: Path, path_exists
|
|||||||
@mark.parametrize("path_exists", [(True), (False)])
|
@mark.parametrize("path_exists", [(True), (False)])
|
||||||
@patch("libkeyringctl.keyring.get_packets_from_path")
|
@patch("libkeyringctl.keyring.get_packets_from_path")
|
||||||
def test_get_packets_from_listing(get_packets_from_path_mock: Mock, working_dir: Path, path_exists: bool) -> None:
|
def test_get_packets_from_listing(get_packets_from_path_mock: Mock, working_dir: Path, path_exists: bool) -> None:
|
||||||
|
|
||||||
path = working_dir / "path"
|
path = working_dir / "path"
|
||||||
if not path_exists:
|
if not path_exists:
|
||||||
assert keyring.get_packets_from_listing(path=path) == []
|
assert keyring.get_packets_from_listing(path=path) == []
|
||||||
@ -704,7 +703,6 @@ def test_derive_username_from_fingerprint(
|
|||||||
keyring_dir: Path,
|
keyring_dir: Path,
|
||||||
valid_fingerprint: str,
|
valid_fingerprint: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
username = "username"
|
username = "username"
|
||||||
other_username = "other_user"
|
other_username = "other_user"
|
||||||
|
|
||||||
@ -791,7 +789,6 @@ def test_inspect_keyring(working_dir: Path, keyring_dir: Path) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_get_fingerprints_from_paths(keyring_dir: Path, valid_fingerprint: str, valid_subkey_fingerprint: str) -> None:
|
def test_get_fingerprints_from_paths(keyring_dir: Path, valid_fingerprint: str, valid_subkey_fingerprint: str) -> None:
|
||||||
|
|
||||||
fingerprint_dir = keyring_dir / "type" / "username" / valid_fingerprint
|
fingerprint_dir = keyring_dir / "type" / "username" / valid_fingerprint
|
||||||
fingerprint_dir.mkdir(parents=True)
|
fingerprint_dir.mkdir(parents=True)
|
||||||
(fingerprint_dir / (fingerprint_dir.name + ".asc")).touch()
|
(fingerprint_dir / (fingerprint_dir.name + ".asc")).touch()
|
||||||
|
Loading…
Reference in New Issue
Block a user