Created
August 17, 2017 21:14
-
-
Save LucasMagnum/65425f73807da299b08acac8ef393daa to your computer and use it in GitHub Desktop.
Check category functions
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_active_subcategories, | |
categories_list_active_subcategories_using_prefetch_attr, | |
categories_list_active_subcategories_using_prefetch_queryset | |
) | |
results = [ | |
categories_list_active_subcategories(), | |
categories_list_active_subcategories_using_prefetch_attr(), | |
categories_list_active_subcategories_using_prefetch_queryset(), | |
] | |
assert len(results[0]) == 50 | |
assert results[0] == results[1] == results[2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment