Skip to content

Commit

Permalink
clean up older names
Browse files Browse the repository at this point in the history
  • Loading branch information
IanBoden committed Jun 19, 2024
1 parent 6f43ee4 commit 3cf123d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_api_state_thingState.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3cf123d

Please sign in to comment.