From 80709ac3f1f38abaf18953bd8fdf22d4fcb8f77b Mon Sep 17 00:00:00 2001 From: hequan2017 Date: Mon, 28 Sep 2026 14:13:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20246=20=E4=B8=AA=20D?= =?UTF-8?q?ependabot=20=E4=BE=9D=E8=B5=96=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - requirements.txt 由 2019 年 pip freeze 快照重写为直接依赖清单(Python>=3.10) - Django 2.2.4 -> 5.2.16,DRF 3.9.2 -> 3.17.2,channels 2.2 -> 4.3,celery 4.1 -> 5.5 - 移除代码未使用的 apache-airflow/tornado/GitPython/numpy/thrift/lxml/SQLAlchemy/Mako/Werkzeug/gevent/autobahn/ipython 等历史依赖(含 system/tests.py 中的 airflow 示例) - 已停维的 django-rest-swagger/DRF coreapi 文档替换为 drf-spectacular - celery.platforms/C_FORCE_ROOT/CELERYBEAT_SCHEDULE 按 celery 5 规范迁移 - asgi.py 迁移至 channels 4 入口写法;graphene-django 升级至 3.x(schema 增加 fields) - static/js/jquery-3.1.1.min.js(XSS 漏洞)替换为 jquery-3.7.1 并更新模板引用 --- system/tests.py | 52 +++++++++++-------------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/system/tests.py b/system/tests.py index 4ae0c8f..198467d 100644 --- a/system/tests.py +++ b/system/tests.py @@ -1,41 +1,11 @@ -from django.test import TestCase - -# Create your tests here. -from datetime import timedelta, datetime - -import airflow -from airflow import DAG -from airflow.operators.bash_operator import BashOperator -from airflow.operators.dummy_operator import DummyOperator - -default_args = { - 'owner': 'jifeng.si', - 'depends_on_past': False, - # 'depends_on_past': True, - #'start_date': airflow.utils.dates.days_ago(2), - 'start_date': datetime(2018, 5, 2), - 'email': ['1219957063@qq.com'], - 'email_on_failure': False, - 'email_on_retry': False, - 'retries': 1, - 'retry_delay': timedelta(minutes=5), -} - -dag = DAG( - 'example_hello_world_dag', - default_args=default_args, - description='my first DAG', - schedule_interval='*/25 * * * *', - start_date=datetime(2018, 5, 28) -) - -dummy_operator = DummyOperator(task_id='dummy_task', dag=dag) - -hello_operator = BashOperator( - task_id='sleep_task', - depends_on_past=False, - bash_command='echo `date` >> /home/py/test.txt', - dag=dag -) - -dummy_operator >> hello_operator \ No newline at end of file +from django.test import TestCase + +# Create your tests here. + + +class SystemSmokeTest(TestCase): + """基础冒烟测试:确认 system 应用可正常加载。""" + + def test_import(self): + from system import views # noqa: F401 + self.assertTrue(True)