diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-08-19 21:35:02 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-08-19 21:35:02 +0000 |
| commit | 9180112f021d0a2a16e29565ece4f137a1a99823 (patch) | |
| tree | e51e4792f91995f8572df238fa58e4bb4da2cc85 | |
| parent | 00c6acaaf30adfb77dd38bf2064ed33d314258d9 (diff) | |
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
| -rw-r--r-- | tests/testapp/models/ordering.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testapp/models/ordering.py b/tests/testapp/models/ordering.py index 6f535f174f..0efa0638df 100644 --- a/tests/testapp/models/ordering.py +++ b/tests/testapp/models/ordering.py @@ -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] """ |
