Example #1
0
 def execute(self, request, *args, **kwargs):
     out = {}
     self.client = self.get_client()
     try:
         out['result'] = self.function(self.client, *args, **kwargs)
     except Exception as ex:
         out['error'] = self.wrap_error(ex, ex.__traceback__)
     out['program'] = js_compile(self.client)
     return out
Example #2
0
 def execute(self, request, *args, **kwargs):
     out = {}
     self.client = self.get_client()
     try:
         out['result'] = self.function(self.client, *args, **kwargs)
     except Exception as ex:
         out['error'] = self.wrap_error(ex, ex.__traceback__)
     out['program'] = js_compile(self.client)
     return out
Example #3
0
def test_client_namespace(client):
    client.console.log('hello')
    assert js_compile(client) == "console.log('hello');"
Example #4
0
def test_dialog(client):
    client.dialog(html='Hello world!')
    assert js_compile(client) == "var __v1 = srvice.dialog({" \
                                 "dialogContentId: null, dialogId: 'dialog', " \
                                 "html: 'Hello world!', sourceId: null});"