Просмотр исходного кода

fix: ruff with statements (#12578)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
tags/0.15.1
yihong 9 месяцев назад
Родитель
Сommit
831459b895
Аккаунт пользователя с таким Email не найден
2 измененных файлов: 4 добавлений и 4 удалений
  1. 1
    0
      api/.ruff.toml
  2. 3
    4
      api/tests/integration_tests/controllers/test_controllers.py

+ 1
- 0
api/.ruff.toml Просмотреть файл

@@ -69,6 +69,7 @@ ignore = [
"SIM108", # if-else-block-instead-of-if-exp
"SIM113", # enumerate-for-loop
"SIM117", # multiple-with-statements
"SIM210", # if-expr-with-true-false
]

[lint.per-file-ignores]

+ 3
- 4
api/tests/integration_tests/controllers/test_controllers.py Просмотреть файл

@@ -4,7 +4,6 @@ from app_fixture import mock_user # type: ignore


def test_post_requires_login(app):
with app.test_client() as client:
with patch("flask_login.utils._get_user", mock_user):
response = client.get("/console/api/data-source/integrates")
assert response.status_code == 200
with app.test_client() as client, patch("flask_login.utils._get_user", mock_user):
response = client.get("/console/api/data-source/integrates")
assert response.status_code == 200

Загрузка…
Отмена
Сохранить