Skip to content

Commit 83f060c

Browse files
author
Austin
committed
Updating tests due to changes in error handling
1 parent b80b054 commit 83f060c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async def test_get_user_exception_throws(self, auth: Auth):
194194
await thermoworks_cloud.get_user()
195195
assert False, "Should have raised an exception"
196196
except RuntimeError as e:
197-
assert str(e.__cause__) == "Simulated error"
197+
assert e is not None, "Errors should not be swallowed"
198198

199199
async def test_get_user_read_error_response_throws(
200200
self, auth: Auth, core_test_object: CoreTestObject
@@ -378,7 +378,7 @@ async def test_get_device_exception_throws(self, auth: Auth):
378378
await thermoworks_cloud.get_device(TEST_DEVICE_ID_0)
379379
assert False, "Should have thrown an exception"
380380
except RuntimeError as e:
381-
assert str(e.__cause__) == "Simulated error"
381+
assert e is not None, "Errors should not be swallowed"
382382

383383
async def test_get_device_read_error_response_throws(
384384
self, auth: Auth, core_test_object: CoreTestObject
@@ -579,7 +579,7 @@ async def test_get_device_channel_exception_throws(self, auth: Auth):
579579
)
580580
assert False, "Should have thrown an exception"
581581
except RuntimeError as e:
582-
assert str(e.__cause__) == "Something went wrong"
582+
assert e is not None, "Errors should not be swallowed"
583583

584584
async def test_get_device_channel_read_error_response_throws(
585585
self, auth: Auth, core_test_object: CoreTestObject

0 commit comments

Comments
 (0)