def echo(self): # Assume the JSON params field is a list of length at least one rv = echo(self.method, self.params[0]) if (isinstance(rv, dict)): self.json_response["error"] = rv elif (rv): self.json_response["result"] = rv
def echo(self): # Assume the JSON params field is a list of length at least one rv = echo(self.method, self.params[0]) if(isinstance(rv, dict)): self.json_response["error"] = rv elif(rv): self.json_response["result"] = rv
def celery_echo(mth, txt): return echo(mth,txt)
def test_echo_happy_path(self): result = views.echo("John") self.assertTrue("Hello John! The time is " in result) self.assertEquals(len(result), 51)