Exemplo n.º 1
0
 def test_to_string_handles_empty_value(self):
     inst = ErrorEvent({})
     result = inst.to_string({'type': 'Error', 'value': ''})
     assert result == 'Error'
Exemplo n.º 2
0
 def test_to_string_none_value(self):
     inst = ErrorEvent({})
     result = inst.to_string({'type': 'Error', 'value': None})
     assert result == 'Error'
Exemplo n.º 3
0
 def test_to_string_eliminates_values_with_newline(self):
     inst = ErrorEvent({})
     result = inst.to_string({'type': 'Error', 'value': 'foo\nbar'})
     assert result == 'Error: foo'