layout | permalink | title |
---|---|---|
page |
/django-tips |
Django Tips |
{% include tag-pages-loop.html tagName='Django' %}
import pdb
pdb.set_trace()
We used Pytest which is built-in.
Testing tools like mocks and factories are also built in.
To run tests: poetry run pytest
.
Annotations to mark tests that access the DB
@pytest.mark.django_db
@patch("psycopg2.connect")
- Tasks. These use annotations like
@task
- Signals. These are a triggering mechanisms.
Rails:
object.inspect
Django:
Object.__dict__