Re-Write Django tests with pytest | pytest fixtures & test functions
Автор: BugBytes
Загружено: 2024-04-15
Просмотров: 5113
In this video, we'll re-write Django tests using the pytest framework, and will explore the tools provided by pytest and the pytest-django plugin when working with Django applications.
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:37 pytest intro
01:36 Writing pytest functions
02:23 pytest-django ‘settings’ fixture
04:42 pytest-django ‘client’ fixture
05:53 Creating pytest.ini configuration file
07:36 Disabling logging with Pytest autouse fixture
08:58 Testing when maintenance mode is off
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
pytest: https://docs.pytest.org/en/8.0.x/
pytest-django: https://pytest-django.readthedocs.io/...
Overriding Settings with pytest: https://pytest-django.readthedocs.io/...
pytest-django assertions: https://pytest-django.readthedocs.io/...
#python #django #webdevelopment
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: