def assert_state(self, state): if 'sid' in state: return rules.assert_state(self._handle, str(state['sid']), json.dumps(state, ensure_ascii=False)) else: return rules.assert_state(self._handle, None, json.dumps(state, ensure_ascii=False))
def assert_state(self, state): return rules.assert_state(self._handle, json.dumps(state))
def assert_state(self, state): rules.assert_state(self._handle, json.dumps(state))
def assert_state(self, state, complete): try: complete(None, rules.assert_state(self._handle, json.dumps(state))) except Exception as error: complete(error, None)
def assert_state(self, state): return rules.assert_state(self._handle, str(state['sid']), json.dumps(state))