def test_from_data_result(self):
     resp = Proto2Response.from_data("result")
     self.assertEqual(None, resp.error)
     self.assertEqual("result", resp.result)
 def test_from_data_error(self):
     data = {"error": "error"}
     resp = Proto2Response.from_data(data)
     self.assertEqual(data, resp.error)
     self.assertEqual(None, resp.result)
Beispiel #3
0
 def test_from_data_result(self):
     resp = Proto2Response.from_data("result")
     self.assertEqual(None, resp.error)
     self.assertEqual("result", resp.result)
 def create(self, error="error", result="result"):
     return Proto2Response(error, result)
Beispiel #5
0
 def test_from_data_error(self):
     data = {"error": "error"}
     resp = Proto2Response.from_data(data)
     self.assertEqual(data, resp.error)
     self.assertEqual(None, resp.result)