From 3cf123da98b3bf3a733f0f3a715ae8c5207ee899 Mon Sep 17 00:00:00 2001 From: Ian Boden Date: Wed, 19 Jun 2024 13:11:20 +0100 Subject: [PATCH] clean up older names --- test/test_api_state_thingState.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_api_state_thingState.py b/test/test_api_state_thingState.py index 6d57fed..5a87487 100644 --- a/test/test_api_state_thingState.py +++ b/test/test_api_state_thingState.py @@ -57,8 +57,11 @@ class TestThing(testUtils.AbstractTest): "required": ["temperature"], } testLogicalInterfaceName = "python-api-test-dt-li" + # Previous tests used an old name so we may need to clean them up + testLogicalInterfaceNameOld = "python-api-test-tt-li" testThingLISchema = "python-api-test-tt-li-schema" + defaultThingState = {"Temperature": 0.0} testDeviceTypeName = "python-api-test-DeviceType" @@ -115,7 +118,7 @@ def testCleanup(self): # delete any left over logical interfaces for li in self.appClient.state.draft.logicalInterfaces: - if li.name in (TestThing.testLogicalInterfaceName, TestThing.testThingLISchema): + if li.name in (TestThing.testLogicalInterfaceName, TestThing.testThingLISchema, TestThing.testLogicalInterfaceNameOld): print("Deleting old test LI: %s" % (li)) del self.appClient.state.draft.logicalInterfaces[li.id] else: