Created
August 17, 2017 20:35
-
-
Save LucasMagnum/efe74895552ebd24c5897db90b81712a to your computer and use it in GitHub Desktop.
Debugger categories list #djangotip02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $ python app/manage.py shell | |
from products.queries import ( | |
categories_list, | |
categories_list_prefetch_related, | |
debugger_categories_list_prefetch_related | |
) | |
# assert categories list and categories with prefetch return the same values | |
assert len(categories_list()) == 50 | |
assert categories_list() == categories_list_prefetch_related() | |
_ = debugger_categories_list_prefetch_related() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment