File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 16
16
17
17
from src .casdoor .async_main import AsyncCasdoorSDK
18
18
from src .casdoor .user import User
19
+ import src .tests .test_util as test_util
19
20
20
21
21
22
class TestOAuth (IsolatedAsyncioTestCase ):
@@ -38,12 +39,12 @@ class TestOAuth(IsolatedAsyncioTestCase):
38
39
@staticmethod
39
40
def get_sdk ():
40
41
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 ,
47
48
)
48
49
return sdk
49
50
Original file line number Diff line number Diff line change 18
18
19
19
from src .casdoor .main import CasdoorSDK
20
20
from src .casdoor .user import User
21
+ import src .tests .test_util as test_util
21
22
22
23
23
24
class TestOAuth (TestCase ):
@@ -40,12 +41,12 @@ class TestOAuth(TestCase):
40
41
@staticmethod
41
42
def get_sdk ():
42
43
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 ,
49
50
)
50
51
return sdk
51
52
You can’t perform that action at this time.
0 commit comments