Example #1
0
 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
Example #2
0
 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
Example #3
0
def celery_echo(mth, txt):
    return echo(mth,txt)
Example #4
0
 def test_echo_happy_path(self):
     result = views.echo("John")
     self.assertTrue("Hello John! The time is " in result) 
     self.assertEquals(len(result), 51)