def test_encode(self): response = ControlResponse() response.setStatusCode(404) response.setStatusText("Nothing not found") response.setBodyAsControlParameters(ControlParameters()) response.getBodyAsControlParameters().setFaceId(10) wire = response.wireEncode() self.assertTrue(wire.equals(TestControlResponse1))
def test_decode(self): response = ControlResponse() response.wireDecode(TestControlResponse1) self.assertEqual(response.getStatusCode(), 404) self.assertEqual(response.getStatusText(), "Nothing not found") self.assertEqual(response.getBodyAsControlParameters().getFaceId(), 10)
def test_decode(self): response = ControlResponse() response.wireDecode(TestControlResponse1) self.assertEqual(response.getStatusCode(), 404); self.assertEqual(response.getStatusText(), "Nothing not found"); self.assertEqual(response.getBodyAsControlParameters().getFaceId(), 10);