def test_add_none_error_adds_no_error(): w = Worker('test', None, None, None) payload = {} error_payload = w.add_error(payload, None) expected = {} assert expected == error_payload
def test_add_error(): w = Worker('test', None, None, None) payload = {} error_payload = w.add_error(payload, invalid_payload_error) expected = {'error': {'test': [invalid_payload_error, ]}} assert expected == error_payload