Beispiel #1
0
    def test_create_user_destination(self, dao_create):
        user = Mock(User, id=1)

        expected_func_key = FuncKey(type='speeddial',
                                    destination='user',
                                    destination_id=user.id)

        destination.create_user_destination(user)

        dao_create.assert_called_once_with(expected_func_key)
Beispiel #2
0
    def test_create_user_destination(self,
                                     dao_create):
        user = Mock(User, id=1)

        expected_func_key = FuncKey(type='speeddial',
                                    destination='user',
                                    destination_id=user.id)

        destination.create_user_destination(user)

        dao_create.assert_called_once_with(expected_func_key)
Beispiel #3
0
def _create_user_in_database(user):
    user.private_template_id = template_dao.create_private_template()
    user = user_dao.create(user)
    dial_action_dao.create_default_dial_actions_for_user(user)
    func_key_destination.create_user_destination(user)
    return user