From 5ab4dc51dea2f33f9af047f99c7e9ec43ae48e0e Mon Sep 17 00:00:00 2001 From: Erik De Smedt Date: Mon, 17 Jun 2024 10:34:10 +0200 Subject: [PATCH] gl-testing: Clean up imports --- libs/gl-testing/gltesting/fixtures.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/libs/gl-testing/gltesting/fixtures.py b/libs/gl-testing/gltesting/fixtures.py index 913439008..29d3caca6 100644 --- a/libs/gl-testing/gltesting/fixtures.py +++ b/libs/gl-testing/gltesting/fixtures.py @@ -1,19 +1,16 @@ # Pytest fixtures -import tempfile -from .scheduler import Scheduler -from gltesting.clients import Clients, Client -from ephemeral_port_reserve import reserve -import pytest -from gltesting import certs -from gltesting.identity import Identity -import os -from pathlib import Path import logging +import os import sys -from pyln.testing.fixtures import bitcoind, teardown_checks, node_cls, test_name, executor, db_provider, test_base_dir, jsonschemas -from gltesting.network import node_factory -from pyln.testing.fixtures import directory as str_directory from decimal import Decimal +from pathlib import Path + +import pytest +from ephemeral_port_reserve import reserve +from gltesting import certs +from gltesting.clients import Clients +from pyln.testing.fixtures import directory as str_directory +from .scheduler import Scheduler logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) logging.getLogger().addHandler(logging.StreamHandler(sys.stdout)) @@ -22,7 +19,7 @@ logger = logging.getLogger(__name__) @pytest.fixture() -def directory(str_directory : str) -> Path: +def directory(str_directory: str) -> Path: return Path(str_directory) / "gl-testing" @pytest.fixture() @@ -45,7 +42,7 @@ def root_id(cert_directory): @pytest.fixture() -def scheduler_id(root_id): +def scheduler_id(): certs.genca("/services") id = certs.gencert("/services/scheduler") yield id @@ -57,7 +54,7 @@ def users_id(): @pytest.fixture() -def nobody_id(users_id): +def nobody_id(): identity = certs.gencert("/users/nobody") os.environ.update( {