Exemple #1
0
 def test_handlesMissingFailure(self, jr):
     """
     Calling err without an actual failure works and returns the event as
     a string wrapped in ReprWrapper.
     """
     assert (ReprWrapper('{"event": "foo"}') == jr(None, "err",
                                                   {"event": "foo"})[0][0])
     assert (ReprWrapper('{"event": "foo"}') == jr(None, "err",
                                                   {"_why": "foo"})[0][0])
 def test_msgWorksToo(self, jr):
     """
     msg renders the event as a string and wraps it using ReprWrapper.
     """
     assert ReprWrapper(
         '{"event": "foo"}'
     ) == jr(None, 'msg', {'_why': 'foo'})[0][0]
Exemple #3
0
 def test_msgWorksToo(self, jr):
     """
     msg renders the event as a string and wraps it using ReprWrapper.
     """
     assert (
         ReprWrapper('{"event": "foo"}')
         == jr(None, "msg", {"_why": "foo"})[0][0]
     )
Exemple #4
0
 def test_repr(self):
     """
     The repr of the wrapped string is the vanilla string without quotes.
     """
     assert "foo" == repr(ReprWrapper("foo"))