test: refactor move fixtures to beginning
Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
This commit is contained in:
parent
9422e62b81
commit
6c6508b11d
|
@ -33,6 +33,18 @@ def your_dummy_data():
|
|||
return '{"name":"paul"}'
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def dummy_event(dummy_attributes, my_dummy_data):
|
||||
return CloudEvent(attributes=dummy_attributes, data=my_dummy_data)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def non_exiting_attribute_name(dummy_event):
|
||||
result = "nonexisting"
|
||||
assert result not in dummy_event
|
||||
return result
|
||||
|
||||
|
||||
def test_http_cloudevent_equality(dummy_attributes, my_dummy_data, your_dummy_data):
|
||||
data = my_dummy_data
|
||||
event1 = CloudEvent(dummy_attributes, data)
|
||||
|
@ -131,18 +143,6 @@ def test_none_json_or_string():
|
|||
assert _json_or_string(None) is None
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def dummy_event(dummy_attributes, my_dummy_data):
|
||||
return CloudEvent(attributes=dummy_attributes, data=my_dummy_data)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def non_exiting_attribute_name(dummy_event):
|
||||
result = "nonexisting"
|
||||
assert result not in dummy_event
|
||||
return result
|
||||
|
||||
|
||||
def test_get_operation_on_non_existing_attribute_must_not_raise_exception(
|
||||
dummy_event, non_exiting_attribute_name
|
||||
):
|
||||
|
|
Loading…
Reference in New Issue