def _create_incall_association(line_extension): user_line = user_line_dao.find_main_user_line(line_extension.line_id) incall = Incall.user_destination(user_line.user_id, line_extension.extension_id) created_incall = incall_dao.create(incall) extension_dao.associate_destination(line_extension.extension_id, 'incall', created_incall.id)
def test_given_user_incall_then_creates_dialaction_row(self): created_incall = dao.create(self.incall) self.assert_dialaction_row_created(created_incall.id)