diff --git a/cloudevents/tests/test_abstract_cloudevent.py b/cloudevents/tests/test_abstract_cloudevent.py new file mode 100644 index 0000000..06c5cce --- /dev/null +++ b/cloudevents/tests/test_abstract_cloudevent.py @@ -0,0 +1,41 @@ +from cloudevents.abstract import CloudEvent +import pytest + + +def test_del_is_abstract(): + """ + exists mainly for coverage reasons + """ + with pytest.raises(TypeError): + del CloudEvent()["a"] + + +def test_set_is_abstract(): + """ + exists mainly for coverage reasons + """ + with pytest.raises(TypeError): + CloudEvent()["a"] = 2 + + +def test_create_is_abstract(): + """ + exists mainly for coverage reasons + """ + assert CloudEvent.create({}, None) is None + + +def test_data_read_is_abstract(): + """ + exists mainly for coverage reasons + """ + with pytest.raises(TypeError): + CloudEvent()._data_read_model + + +def test_attributes_read_model_is_abstract(): + """ + exists mainly for coverage reasons + """ + with pytest.raises(TypeError): + CloudEvent()._attributes_read_model