From ea19f7dbd6287ef0d8da9c17cccda0487ccb9eaa Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Sun, 24 Jul 2022 23:10:53 +0300 Subject: [PATCH] test: fix broken test Signed-off-by: Alexander Tkachev --- ...tract_cloudevent.py => test_generic_cloudevent.py} | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename cloudevents/tests/{test_abstract_cloudevent.py => test_generic_cloudevent.py} (70%) diff --git a/cloudevents/tests/test_abstract_cloudevent.py b/cloudevents/tests/test_generic_cloudevent.py similarity index 70% rename from cloudevents/tests/test_abstract_cloudevent.py rename to cloudevents/tests/test_generic_cloudevent.py index 59ea305..1b49aab 100644 --- a/cloudevents/tests/test_abstract_cloudevent.py +++ b/cloudevents/tests/test_generic_cloudevent.py @@ -6,7 +6,7 @@ def test_del_is_abstract(): """ exists mainly for coverage reasons """ - with pytest.raises(TypeError): + with pytest.raises(NotImplementedError): del CloudEvent()["a"] @@ -14,7 +14,7 @@ def test_set_is_abstract(): """ exists mainly for coverage reasons """ - with pytest.raises(TypeError): + with pytest.raises(NotImplementedError): CloudEvent()["a"] = 2 @@ -22,14 +22,15 @@ def test_create_is_abstract(): """ exists mainly for coverage reasons """ - assert CloudEvent.create({}, None) is None + with pytest.raises(NotImplementedError): + assert CloudEvent.create({}, None) is None def test_data_read_is_abstract(): """ exists mainly for coverage reasons """ - with pytest.raises(TypeError): + with pytest.raises(NotImplementedError): CloudEvent()._data_read_model @@ -37,5 +38,5 @@ def test_attributes_read_model_is_abstract(): """ exists mainly for coverage reasons """ - with pytest.raises(TypeError): + with pytest.raises(NotImplementedError): CloudEvent()._attributes_read_model