Skip to content

Instantly share code, notes, and snippets.

@LucasMagnum
Last active August 17, 2017 20:03
Show Gist options
  • Save LucasMagnum/82bd93423c567e10128fa81b3b90feb7 to your computer and use it in GitHub Desktop.
Save LucasMagnum/82bd93423c567e10128fa81b3b90feb7 to your computer and use it in GitHub Desktop.
Test product list #djangotip02
# $ python app/manage.py shell
from products.queries import products_list
products = products_list()
# check the all products were returned
assert len(products) == 500
assert list(products[0].keys()) == ['id', 'title', 'category']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment