diff --git a/tests/conftest.py b/tests/conftest.py index d39e96e0..168ef3e8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -74,6 +74,11 @@ def service(file_system) -> TestService: ) +@pytest.fixture(scope="function") +def service_class(): + return TestService + + @pytest.fixture(scope="function") def application(file_system) -> TestApplication: return TestApplication( @@ -81,6 +86,11 @@ def application(file_system) -> TestApplication: ) +@pytest.fixture(scope="function") +def application_class(): + return TestApplication + + @pytest.fixture(scope="function") def file_system() -> FileSystem: return Node(hostname="fs_node").file_system diff --git a/tests/integration_tests/system/test_app_service_on_node.py b/tests/integration_tests/system/test_app_service_on_node.py index cbcb4ff6..7777a810 100644 --- a/tests/integration_tests/system/test_app_service_on_node.py +++ b/tests/integration_tests/system/test_app_service_on_node.py @@ -1,7 +1,6 @@ from typing import Tuple import pytest -from conftest import TestApplication, TestService from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState from primaite.simulator.network.hardware.nodes.server import Server @@ -10,12 +9,12 @@ from primaite.simulator.system.services.service import Service, ServiceOperating @pytest.fixture(scope="function") -def populated_node() -> Tuple[Application, Server, Service]: +def populated_node(service_class, application_class) -> Tuple[Application, Server, Service]: server = Server( hostname="server", ip_address="192.168.0.1", subnet_mask="255.255.255.0", operating_state=NodeOperatingState.ON ) - server.software_manager.install(TestService) - server.software_manager.install(TestApplication) + server.software_manager.install(service_class) + server.software_manager.install(application_class) app = server.software_manager.software["TestApplication"] app.run()