diff --git a/test/fixtures/__init__.py b/test/fixtures/__init__.py index b2ee468ffd7c698d291e1390dfd79ae19b10f1be..5fa18f0139c571571e8692285e3700a74263f9bd 100644 --- a/test/fixtures/__init__.py +++ b/test/fixtures/__init__.py @@ -11,6 +11,8 @@ from test.fixtures.l3_core_service_fixtures import ( l3_core_service_subscription_factory, lhcone_subscription_factory, make_subscription_factory, + r_and_e_lhcone_subscription_factory, + r_and_e_peer_subscription_factory, save_l3_core_subscription, service_binding_port_factory, ) @@ -42,6 +44,8 @@ __all__ = [ "make_subscription_factory", "office_router_subscription_factory", "opengear_subscription_factory", + "r_and_e_lhcone_subscription_factory", + "r_and_e_peer_subscription_factory", "router_subscription_factory", "save_l3_core_subscription", "service_binding_port_factory", diff --git a/test/fixtures/l3_core_service_fixtures.py b/test/fixtures/l3_core_service_fixtures.py index c81bb1ea0ba67a83d7057b2bb5136a1b33d165fa..bac0fbc3c310b2b0bd3dbb3228c4fd320dee7104 100644 --- a/test/fixtures/l3_core_service_fixtures.py +++ b/test/fixtures/l3_core_service_fixtures.py @@ -19,6 +19,8 @@ from gso.products.product_types.edge_port import EdgePort from gso.products.product_types.geant_ip import GeantIPInactive, ImportedGeantIPInactive from gso.products.product_types.ias import IASInactive, ImportedIASInactive from gso.products.product_types.lhcone import ImportedLHCOneInactive, LHCOneInactive +from gso.products.product_types.r_and_e_lhcone import ImportedRAndELHCOneInactive, RAndELHCOneInactive +from gso.products.product_types.r_and_e_peer import ImportedRAndEPeerInactive, RAndEPeerInactive from gso.services.subscriptions import get_product_id_by_name from gso.utils.shared_enums import APType, SBPType from gso.utils.types.ip_address import IPAddress @@ -290,12 +292,42 @@ def lhcone_subscription_factory(make_subscription_factory): return factory +@pytest.fixture() +def r_and_e_peer_subscription_factory(make_subscription_factory): + def factory(*args, **kwargs): + return make_subscription_factory( + product_name=ProductName.R_AND_E_PEER, + imported_class=ImportedRAndEPeerInactive, + native_class=RAndEPeerInactive, + *args, # noqa: B026 + **kwargs, + ) + + return factory + + +@pytest.fixture() +def r_and_e_lhcone_subscription_factory(make_subscription_factory): + def factory(*args, **kwargs): + return make_subscription_factory( + product_name=ProductName.R_AND_E_LHCONE, + imported_class=ImportedRAndELHCOneInactive, + native_class=RAndELHCOneInactive, + *args, # noqa: B026 + **kwargs, + ) + + return factory + + @pytest.fixture() def l3_core_service_subscription_factory( ias_subscription_factory, geant_ip_subscription_factory, copernicus_subscription_factory, lhcone_subscription_factory, + r_and_e_peer_subscription_factory, + r_and_e_lhcone_subscription_factory, ) -> callable: def factory(product_name: ProductName, *args, **kwargs): if product_name == ProductName.IAS: @@ -307,6 +339,12 @@ def l3_core_service_subscription_factory( if product_name == ProductName.COPERNICUS: return copernicus_subscription_factory(*args, **kwargs) + if product_name == ProductName.R_AND_E_PEER: + return r_and_e_peer_subscription_factory(*args, **kwargs) + + if product_name == ProductName.R_AND_E_LHCONE: + return r_and_e_lhcone_subscription_factory(*args, **kwargs) + return lhcone_subscription_factory(*args, **kwargs) return factory