Skip to content
Snippets Groups Projects
Commit 2d186123 authored by Neda Moeini's avatar Neda Moeini
Browse files

Add unit test for the terminate WF for Layer 2 Circuit.

parent b2f2fa0c
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !307. Comments created here will be created in the context of that merge request.
import pytest
from gso.products import ProductName
from gso.products.product_types.layer_2_circuit import Layer2Circuit
from test.workflows import assert_complete, extract_state, run_workflow
@pytest.mark.workflow()
@pytest.mark.parametrize("layer_2_circuit_service_type", [ProductName.GEANT_PLUS, ProductName.EXPRESSROUTE])
def test_terminate_layer_2_circuit(layer_2_circuit_service_type, layer_2_circuit_subscription_factory, faker):
subscription_id = layer_2_circuit_subscription_factory(layer_2_circuit_service_type=layer_2_circuit_service_type)
initialt_layer_2_circuit_data = [{"subscription_id": subscription_id}, {"tt_number": faker.tt_number()}]
result, _, _ = run_workflow("terminate_layer_2_circuit", initialt_layer_2_circuit_data)
assert_complete(result)
state = extract_state(result)
subscription_id = state["subscription_id"]
subscription = Layer2Circuit.from_subscription(subscription_id)
assert subscription.status == "terminated"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment