Skip to content

Commit

Permalink
Drop TestResult helper class
Browse files Browse the repository at this point in the history
The class is no longer required. Test results are tested directly.
  • Loading branch information
agners committed May 14, 2024
1 parent eb1231d commit 5466ced
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/controller/python/test/test_scripts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,29 +178,6 @@ def run(self):
TestFail("Timeout", doCrash=True)


class TestResult:
def __init__(self, operationName, result):
self.operationName = operationName
self.result = result

def assertStatusEqual(self, expected):
if self.result is None:
raise Exception(f"{self.operationName}: no result got")
if self.result.status != expected:
raise Exception(
f"{self.operationName}: expected status {expected}, got {self.result.status}")
return self

def assertValueEqual(self, expected):
self.assertStatusEqual(0)
if self.result is None:
raise Exception(f"{self.operationName}: no result got")
if self.result.value != expected:
raise Exception(
f"{self.operationName}: expected value {expected}, got {self.result.value}")
return self


class BaseTestHelper:
def __init__(self, nodeid: int, paaTrustStorePath: str, testCommissioner: bool = False,
keypair: p256keypair.P256Keypair = None):
Expand Down

0 comments on commit 5466ced

Please sign in to comment.