test: add abstract cloudevent coverage tests
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
This commit is contained in:
parent
2b3c0f1292
commit
a22efbde37
|
@ -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
|
Loading…
Reference in New Issue