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

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

parent be83e040
No related branches found
Tags 2.0
1 merge request!307Feature/l2circuits
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.
Finish editing this message first!
Please register or to comment