Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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