您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

test_controllers.py 329B

12345678910
  1. from unittest.mock import patch
  2. from app_fixture import app, mock_user
  3. def test_post_requires_login(app):
  4. with app.test_client() as client:
  5. with patch("flask_login.utils._get_user", mock_user):
  6. response = client.get("/console/api/data-source/integrates")
  7. assert response.status_code == 200