首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Python基础、进阶与实战

    [译]Django项目最常用的20个包

    pytest-django[14] 虽然 Django 内置了测试工具,但 pytest 和 pytest-django 插件在社区中被广泛使用。 django-q2: https://github.com/django-q2/django-q2 [13] Wagtail CMS: https://github.com/wagtail/wagtail [14] pytest-django : https://github.com/pytest-dev/pytest-django [15] pytest-cov: https://github.com/pytest-dev/pytest-cov

    2.4K20编辑于 2024-03-13
  • 来自专栏Python基础、进阶与实战

    2023 年度 Django 开发者调查结果(jetbrains)

    • 核心组件:Model、Admin、Authentication、Migrations、Views、management命令行、Forms、Template • 测试框架:pytest(42%)、pytest-django

    41710编辑于 2024-05-10
  • 来自专栏从零开始学自动化测试

    pytest文档 89 - 安装和使用插件

    下面是一些流行插件的注释列表: pytest-django: 编写测试 django 应用程序,使用pytest集成。

    63210编辑于 2024-05-29
  • 来自专栏开源优测

    如何安装、利用、激活、禁用pytest插件

    下面我们看一下一些常用的插件及介绍: pytest-django: 为django应用编写测试,使用pytest集成 Pytest-twisted: 为twisted应用编写测试 Pytest-cov:

    73910编辑于 2024-04-26
  • 来自专栏编程黑洞

    django rest_framework使用pytest单元测试

    添加一个配置文件 具体看pytest-django官网 (opens new window) [pytest] DJANGO_SETTINGS_MODULE=event_track_root.settings

    92720编辑于 2023-03-06
  • 来自专栏数据STUDIO

    ​Pytest 高效测试 Python 代码

    pytest-django[4]插件提供了一个django_db标记。任何没有这个标记的测试在试图访问数据库时都会失败。第一个试图访问数据库的测试将触发Django测试数据库的创建。 pytest-django pytest-django[9]为处理Django测试提供了一些有用的fixtures 和 marks。 https://www.djangoproject.com/ [3] monkeypatch: https://docs.pytest.org/en/latest/monkeypatch.html [4] pytest-django : https://coverage.readthedocs.io/ [8] pytest-cov: https://pytest-cov.readthedocs.io/en/latest/ [9] pytest-django

    1.4K20编辑于 2023-11-14
  • 来自专栏漫谈测试

    聊一聊接口自动化测试的稳定性如何保障

    使用数据库事务(如 Python 的 pytest-django 插件)在测试后自动回滚数据。数据驱动测试通过参数化覆盖多种场景(如正常值、边界值、异常值)。

    47320编辑于 2025-04-26
  • 来自专栏Tom

    torchvision避坑指南

    1.4.1 pyrsistent 0.16.0 pytest 5.3.5 pytest-django

    1.6K20编辑于 2022-06-08
  • 来自专栏漫谈测试

    聊一聊接口自动化测试如何验证数据库和数据表

    事务管理通过事务回滚(如pytest-django的transactional_db)自动清理数据。

    65820编辑于 2025-04-24
  • 来自专栏浊酒清味

    如何使用Pytest进行自动化测试

    此外,它还拥有广泛的社区支持,这让您可以访问很多扩展,比如pytest-django,它可以帮助您为Django web应用程序集成编写测试。

    2.3K20发布于 2020-12-18
  • 来自专栏深度学习与python

    一个数据库事务 Bug 引发的惨剧

    还好 pytest-django 实现了等效的功能。 我们快速升级到了 pytest-django 4.4 版,准备就绪: def test_should_send_notification( db, mailoutbox, django_capture_on_commit_callbacks

    1.3K20发布于 2021-09-22
  • 来自专栏梦无矶测开实录

    【python自动化】pytest系列(中)

    Pytest-django : 开发web Pytest-selenium : pytest提供运行支持selenium为基础 allure报告 这个展现的测试报告比较全面,也做的比较好,官网,python

    62220编辑于 2023-08-03
  • 来自专栏技术汇总专栏

    使用Django单元测试与集成测试保障Web应用程序代码质量

    例如,使用pytest-django插件可以方便地集成Django应用程序的测试,并提供更多的功能和选项来定制测试行为。

    1K20编辑于 2024-07-06
  • 来自专栏信数据得永生

    Python 架构模式:附录 A 到 E

    https://github.com/cosmicpython/code.git cd code git checkout appendix_django 使用 Django 的存储库模式 我们使用了一个名为pytest-djangopytest-django mark.django_db(transaction=True) 是必须的,用于测试我们的自定义事务/回滚行为。 由于 Django 与数据库紧密耦合,您必须使用诸如pytest-django之类的辅助工具,并从代码的第一行开始仔细考虑测试数据库的使用方式,这是我们在纯领域模型开始时不必考虑的。

    96410编辑于 2024-01-10
  • 来自专栏友弟技术工作室

    Django 优秀资源大全项目资源非 Python 包工具贡献

    pytest-django, star:308 - pytest 的一个 Django 插件。 splinter, star:1355 - Web 应用的一个 Python 测试框架。

    15.8K90发布于 2018-04-25
领券