This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TestResource(Resource): | |
| isLeaf = True | |
| def __init__(self, response, code=http.OK, send_id=None): | |
| self.response = response | |
| self.code = code | |
| self.send_id = send_id | |
| def render_POST(self, request): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function validateResponses($check) | |
| { | |
| $count = 0; | |
| foreach ($check['responses'] as $response) { | |
| $validationErrors = array(); | |
| foreach ($this->validateResponse as $field => $rules) { | |
| foreach ($rules as $rule) { | |
| if (is_array($rule['rule'])) { | |
| $func = $rule['rule'][0]; | |
| $args = array_slice($rule['rule'], 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Dialogue Model | |
| function getRequiredFields($objectType=null) | |
| { | |
| return array( | |
| 'name', | |
| 'dialogue-id', | |
| 'auto-enrollment', | |
| 'interactions', | |
| 'activated', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @inlineCallbacks | |
| def test_limit_max_unmatching_answers(self): | |
| dialogue = self.collections['dialogues'].save(self.mkobj_dialogue_question()) | |
| self.collections['participants'].save(self.mkobj_participant('06')) | |
| inbound_msg_unmatching = self.mkmsg_in(from_addr='06', | |
| content='feel weird') | |
| participant = self.collections['participants'].find_one({'phone': '06'}) | |
| for num in range(5): | |
| yield self.send(inbound_msg_unmatching, 'inbound') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function index() | |
| { | |
| $this->set('filterFieldOptions',$this->filterFieldOptions); | |
| $this->set('filterTypeConditionsOptions',$this->filterTypeConditionsOptions); | |
| $this->set('filterStatusConditionsOptions',$this->filterStatusConditionsOptions); | |
| $this->set('programTimezone', $this->Session->read($this->params['program'].'_timezone')); | |
| if ($this->params['ext'] == 'csv' or $this->params['ext'] == 'json') { | |
| $statuses = $this->History->find('all', array('conditions' => $this->_getConditions(), | |
| 'order'=> array('timestamp' => 'DESC') |