Skip to content

Commit

Permalink
add test for dir over message
Browse files Browse the repository at this point in the history
  • Loading branch information
mzk-vct committed Jul 11, 2017
1 parent 5af24de commit 1d302ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plenum/test/input_validation/test_message_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ def test_that_service_fields_not_being_serialized():
deserialized = ZStack.deserializeMsg(serialized)
service_fields = {'typename', 'schema', 'optional', 'nullable'}
assert service_fields - set(deserialized) == service_fields


def test_that_dir_returns_only_message_keys():
message = LedgerStatus(1, 10, None, None, "AwgQhPR9cgRubttBGjRruCRMLhZFBffbejbPipj7WBBm")
assert set(dir(message)) == set(message.keys())

0 comments on commit 1d302ca

Please sign in to comment.