refactor(backend): 重构后端
This commit is contained in:
1 parent
c8054476c1
commit
bba6e6f221
32 files changed
+252
-296
No files matched your search
@@ -1,3 +1,5 @@
|
||||
from tests.conftest import flatten_api_error, parse_api_error
|
||||
|
||||
from app import db
|
||||
from app.models import User
|
||||
from app.services.auth import wecom_auth_service
|
||||
@@ -92,5 +94,6 @@ def test_wecom_debug_user_by_code_returns_scope_error_when_only_openid(client, a
|
||||
)
|
||||
assert res.status_code == 401
|
||||
data = res.get_json()
|
||||
assert data['error_code'] == 'WECOM_NOT_IN_AGENT_SCOPE'
|
||||
assert data['openid'] == 'oExternal_xx'
|
||||
error = parse_api_error(data)
|
||||
assert error['code'] == 'WECOM_NOT_IN_AGENT_SCOPE'
|
||||
assert error['details']['openid'] == 'oExternal_xx'
|
||||
Reference in new issue
Block a user