コード例 #1
0
ファイル: test_validator.py プロジェクト: jlebleu/xivo-dao
    def test_validate_create(self, validate_missing_parameters, validate_type, validate_destination):
        func_key = Mock(FuncKey)

        validator.validate_create(func_key)

        validate_missing_parameters.assert_called_once_with(func_key)
        validate_type.assert_called_once_with(func_key)
        validate_destination.assert_called_once_with(func_key)
コード例 #2
0
ファイル: test_validator.py プロジェクト: jaunis/xivo-dao
    def test_validate_create(self, validate_missing_parameters, validate_type,
                             validate_destination):
        func_key = Mock(FuncKey)

        validator.validate_create(func_key)

        validate_missing_parameters.assert_called_once_with(func_key)
        validate_type.assert_called_once_with(func_key)
        validate_destination.assert_called_once_with(func_key)
コード例 #3
0
ファイル: services.py プロジェクト: jaunis/xivo-dao
def create(func_key):
    validator.validate_create(func_key)
    created_func_key = dao.create(func_key)
    notifier.created(created_func_key)
    return created_func_key