Skip to content

Commit 6f6dd21

Browse files
author
Michael Brewer
committed
test(data-classes): add missing test for TypeError
1 parent 987c559 commit 6f6dd21

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/functional/test_data_classes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,17 @@ def test_dynamo_attribute_value_ss_value():
542542
assert attribute_value.ss_value == attribute_value.value
543543

544544

545+
def test_dynamo_attribute_value_type_error():
546+
example_attribute_value = {"UNSUPPORTED": "'value' should raise a type error"}
547+
548+
attribute_value = AttributeValue(example_attribute_value)
549+
550+
with pytest.raises(TypeError):
551+
print(attribute_value.value)
552+
with pytest.raises(ValueError):
553+
print(attribute_value.get_type)
554+
555+
545556
def test_event_bridge_event():
546557
event = EventBridgeEvent(load_event("eventBridgeEvent.json"))
547558

0 commit comments

Comments
 (0)