Ejemplo n.º 1
0
 def test_json_handler_writes_and_reads(self, res):
     handler = JSONResultHandler()
     final = handler.read(handler.write(res))
     assert final == res
Ejemplo n.º 2
0
 def test_json_handler_raises_normally(self):
     handler = JSONResultHandler()
     with pytest.raises(TypeError):
         handler.write(type(None))
Ejemplo n.º 3
0
 def test_json_handler_writes(self, res):
     handler = JSONResultHandler()
     blob = handler.write(res)
     assert isinstance(blob, str)