Added 'limit' and 'offset' unit tests, one of which fails in MySQL 3 (refs #350)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-08-19 21:35:02 +00:00
parent 00c6acaaf3
commit 9180112f02
1 changed files with 8 additions and 0 deletions

View File

@ -48,4 +48,12 @@ API_TESTS = """
[Article 1, Article 2, Article 3, Article 4]
>>> articles.get_list(order_by=['pub_date', '-headline'])
[Article 1, Article 3, Article 2, Article 4]
# Use the "limit" parameter to limit the results.
>>> articles.get_list(order_by=['headline'], limit=2)
[Article 1, Article 2]
# Use the "offset" parameter with "limit" to offset the result list.
>>> articles.get_list(order_by=['headline'], offset=1, limit=2)
[Article 2, Article 3]
"""