예제 #1
0
def test_parse_registration_statement_unicode(command):
    ctx = {u'var1': {u'k1': u'thisisval1', u'k2': u'thisisval2'}}
    r = RestrekCommand.parse_registration_statement('key1', 'var1[\'k2\']',
                                                    ctx)
    assert {'key1': 'thisisval2'} == r
예제 #2
0
 def __init__(self, name='mocked command', props=dict(), payload=dict()):
     RestrekCommand.__init__(self, name, props, payload, SCHEMA_IN,
                             SCHEMA_OUT)
예제 #3
0
파일: echo.py 프로젝트: gsuntres/restrek
 def __init__(self, name, props, payload):
     RestrekCommand.__init__(self, name, props, payload, SCHEMA_IN,
                             SCHEMA_OUT)
예제 #4
0
 def __init__(self, name, props, payload):
     RestrekCommand.__init__(self, name, props, payload, SCHEMA_IN,
                             SCHEMA_OUT)
     self.sess = Session()
     self.sess.verify = self.ssl_verify
     self.resp = None
예제 #5
0
def command():
    return RestrekCommand('mycommand554', dict(host='www.bla.gr', secure=True),
                          dict(foo='bar'))