Skip to content

Commit 4b97504

Browse files
committed
feat: fix Casdoor SDK config
1 parent 4f36b59 commit 4b97504

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/tests/test_async_oauth.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from src.casdoor.async_main import AsyncCasdoorSDK
1818
from src.casdoor.user import User
19+
import src.tests.test_util as test_util
1920

2021

2122
class TestOAuth(IsolatedAsyncioTestCase):
@@ -38,12 +39,12 @@ class TestOAuth(IsolatedAsyncioTestCase):
3839
@staticmethod
3940
def get_sdk():
4041
sdk = AsyncCasdoorSDK(
41-
endpoint="https://demo.casdoor.com",
42-
client_id="3267f876b11e7d1cb217",
43-
client_secret="3f0d1f06d28d65309c8f38b505cb9dcfa487754d",
44-
certificate="CasdoorSecret",
45-
org_name="built-in",
46-
application_name="app-built-in",
42+
endpoint=test_util.TestEndpoint,
43+
client_id=test_util.TestClientId,
44+
client_secret=test_util.TestClientSecret,
45+
certificate=test_util.TestJwtPublicKey,
46+
org_name=test_util.TestOrganization,
47+
application_name=test_util.TestApplication,
4748
)
4849
return sdk
4950

src/tests/test_oauth.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from src.casdoor.main import CasdoorSDK
2020
from src.casdoor.user import User
21+
import src.tests.test_util as test_util
2122

2223

2324
class TestOAuth(TestCase):
@@ -40,12 +41,12 @@ class TestOAuth(TestCase):
4041
@staticmethod
4142
def get_sdk():
4243
sdk = CasdoorSDK(
43-
endpoint="https://demo.casdoor.com",
44-
client_id="3267f876b11e7d1cb217",
45-
client_secret="3f0d1f06d28d65309c8f38b505cb9dcfa487754d",
46-
certificate="CasdoorSecret",
47-
org_name="built-in",
48-
application_name="app-built-in",
44+
endpoint=test_util.TestEndpoint,
45+
client_id=test_util.TestClientId,
46+
client_secret=test_util.TestClientSecret,
47+
certificate=test_util.TestJwtPublicKey,
48+
org_name=test_util.TestOrganization,
49+
application_name=test_util.TestApplication,
4950
)
5051
return sdk
5152

0 commit comments

Comments
 (0)