Skip to content

Instantly share code, notes, and snippets.

@jkage
Created October 16, 2012 06:23
Show Gist options
  • Select an option

  • Save jkage/3897515 to your computer and use it in GitHub Desktop.

Select an option

Save jkage/3897515 to your computer and use it in GitHub Desktop.
@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')
histories = self.collections['history'].find({'participant-session-id': participant['session-id']})
self.assertEqual(5, histories.count())
i want to do something like
ref, actions = dialogue.get_matching_reference_and_actions(inbound_msg_unmatching, Actions())
can it work?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment