Django & HTMX App - Custom Managers | pytest & factory-boy for unit tests

Описание к видео Django & HTMX App - Custom Managers | pytest & factory-boy for unit tests

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

⭐Top resource to learn Python - https://datacamp.pxf.io/kOjKkV ⭐

In this video, we'll add a custom model manager to our app's transaction model, and will set up pytest and factory-boy for unit testing our application functionality.

Github: https://github.com/bugbytes-io/Django...

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:55 Creating custom Django QuerySet methods
05:40 Override default model manager in Django model
10:05 Setting up pytest
11:45 Creating factory-boy Factory classes for Django models
18:11 Testing out Factory classes
19:51 Creating pytest fixture to inject transactions
21:22 Writing pytest functions for custom QuerySet methods

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/Django...
🐦 Twitter:   / bugbytesio  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Django Managers: https://docs.djangoproject.com/en/5.0...
Pytest: https://docs.pytest.org/en/8.2.x/
pytest-django: https://pytest-django.readthedocs.io/...
factory-boy: https://factoryboy.readthedocs.io/en/...

#python #django #webdevelopment #htmx

Комментарии

Информация по комментариям в разработке