Files
dify-plugin-sdks/python/tests/interfaces/tool/test_construct_tool_provider.py
T
Yeuoly 6d5d601804 feat[0.4.0](oauth): implement OAuth authorization URL and credentials retrieval (#116)
* feat(oauth): implement OAuth authorization URL and credentials retrieval

- Added OAuthGetAuthorizationUrlRequest and OAuthGetCredentialsRequest models for handling OAuth requests.
- Introduced methods in PluginExecutor for generating OAuth authorization URLs and retrieving OAuth credentials.
- Updated ToolProvider interface to include OAuth methods for authorization URL and credentials handling.
- Refactored PluginInvokeType and related action enums to support OAuth actions.
2025-05-19 22:13:53 +08:00

21 lines
510 B
Python

import pytest
from dify_plugin.interfaces.tool import ToolProvider
def test_construct_tool_provider():
"""
Test that the ToolProvider can be constructed without implementing any methods
"""
provider = ToolProvider()
assert provider is not None
def test_oauth_get_authorization_url():
"""
Test that the ToolProvider can get the authorization url
"""
provider = ToolProvider()
with pytest.raises(NotImplementedError):
provider.oauth_get_authorization_url({})