Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added none data test for marshalling
Signed-off-by: Curtis Mason <[email protected]>
  • Loading branch information
Curtis Mason committed Jul 28, 2020
commit f204dfa30e22e4670da5dec04600b5a92acb0c8b
8 changes: 8 additions & 0 deletions cloudevents/tests/test_http_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,11 @@ def test_cloudevent_repr(specversion):
# we had issues in the past where event.__repr__() could run but
# print(event) would fail.
print(event)


@pytest.mark.parametrize("specversion", ["1.0", "0.3"])
def test_none_data_cloudevent(specversion):
event = CloudEvent({"source": "<my-url>", "type": "issue.example", "specversion": specversion})
to_binary_http(event)
to_structured_http(event)