Loading src/context/tests/test_policy.py +3 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ def test_policy(context_client : ContextClient): response = context_client.GetPolicyRule(PolicyRuleId(**POLICYRULE_ID)) assert response.device.policyRuleBasic.policyRuleId.uuid.uuid == policyrule_uuid assert response.device.policyRuleBasic.priority == 1 assert response.device.policyRuleBasic.kpiId.kpi_id.uuid == 'my-kpi-id' # ----- List when the object exists -------------------------------------------------------------------------------- response = context_client.ListPolicyRuleIds(Empty()) Loading @@ -57,6 +58,7 @@ def test_policy(context_client : ContextClient): assert len(response.policyRules) == 1 assert response.policyRules[0].device.policyRuleBasic.policyRuleId.uuid.uuid == policyrule_uuid assert response.policyRules[0].device.policyRuleBasic.priority == 1 assert response.policyRules[0].device.policyRuleBasic.kpiId.kpi_id.uuid == 'my-kpi-id' # ----- Update the object ------------------------------------------------------------------------------------------ new_policy_priority = 100 Loading @@ -80,7 +82,7 @@ def test_policy(context_client : ContextClient): assert len(response.policyRules) == 1 assert response.policyRules[0].device.policyRuleBasic.policyRuleId.uuid.uuid == policyrule_uuid assert response.policyRules[0].device.policyRuleBasic.priority == new_policy_priority assert response.policyRules[0].device.policyRuleBasic.kpiId.kpi_id.uuid == new_policy_priority assert response.policyRules[0].device.policyRuleBasic.kpiId.kpi_id.uuid == new_policy_kpi_id # ----- Remove the object ------------------------------------------------------------------------------------------ context_client.RemovePolicyRule(PolicyRuleId(**POLICYRULE_ID)) Loading Loading
src/context/tests/test_policy.py +3 −1 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ def test_policy(context_client : ContextClient): response = context_client.GetPolicyRule(PolicyRuleId(**POLICYRULE_ID)) assert response.device.policyRuleBasic.policyRuleId.uuid.uuid == policyrule_uuid assert response.device.policyRuleBasic.priority == 1 assert response.device.policyRuleBasic.kpiId.kpi_id.uuid == 'my-kpi-id' # ----- List when the object exists -------------------------------------------------------------------------------- response = context_client.ListPolicyRuleIds(Empty()) Loading @@ -57,6 +58,7 @@ def test_policy(context_client : ContextClient): assert len(response.policyRules) == 1 assert response.policyRules[0].device.policyRuleBasic.policyRuleId.uuid.uuid == policyrule_uuid assert response.policyRules[0].device.policyRuleBasic.priority == 1 assert response.policyRules[0].device.policyRuleBasic.kpiId.kpi_id.uuid == 'my-kpi-id' # ----- Update the object ------------------------------------------------------------------------------------------ new_policy_priority = 100 Loading @@ -80,7 +82,7 @@ def test_policy(context_client : ContextClient): assert len(response.policyRules) == 1 assert response.policyRules[0].device.policyRuleBasic.policyRuleId.uuid.uuid == policyrule_uuid assert response.policyRules[0].device.policyRuleBasic.priority == new_policy_priority assert response.policyRules[0].device.policyRuleBasic.kpiId.kpi_id.uuid == new_policy_priority assert response.policyRules[0].device.policyRuleBasic.kpiId.kpi_id.uuid == new_policy_kpi_id # ----- Remove the object ------------------------------------------------------------------------------------------ context_client.RemovePolicyRule(PolicyRuleId(**POLICYRULE_ID)) Loading