Files
dify-plugin-sdks/python/tests/interfaces/trigger/test_construct_trigger_provider.py
T
Harry 34cf20564b fix(test): update test case for oauth_get_authorization_url to include redirect URI
- Modified the test for `oauth_get_authorization_url` to pass a redirect URI as the first argument, ensuring proper functionality and coverage.

This change enhances the accuracy of the test case for the TriggerProvider's OAuth implementation.
2025-09-09 00:03:14 +08:00

21 lines
554 B
Python

import pytest
from dify_plugin.interfaces.trigger import TriggerProvider
def test_construct_trigger_provider():
"""
Test that the TriggerProvider can be constructed without implementing any methods
"""
provider = TriggerProvider()
assert provider is not None
def test_oauth_get_authorization_url():
"""
Test that the TriggerProvider can get the authorization url
"""
provider = TriggerProvider()
with pytest.raises(NotImplementedError):
provider.oauth_get_authorization_url("http://redirect.uri", {})