diff options
| author | Ben Konrath | 2012-10-11 13:55:16 +0200 |
|---|---|---|
| committer | Ben Konrath | 2012-10-11 13:55:16 +0200 |
| commit | 6f736a682369e003e4ae4b8d587f9168d4196986 (patch) | |
| tree | 3cbc6310d693d9d82f43c6920bd581584911ab70 /rest_framework/tests/pagination.py | |
| parent | 6300334acaef8fe66e03557f089fb335ac861a57 (diff) | |
| download | django-rest-framework-6f736a682369e003e4ae4b8d587f9168d4196986.tar.bz2 | |
Explicitly use Decimal for creating filter test data.
This fixes a Travis build failures on python 2.6:
https://travis-ci.org/#!/tomchristie/django-rest-framework/builds/2746628
Diffstat (limited to 'rest_framework/tests/pagination.py')
| -rw-r--r-- | rest_framework/tests/pagination.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/tests/pagination.py b/rest_framework/tests/pagination.py index 054b7ee3..8c5e6ad7 100644 --- a/rest_framework/tests/pagination.py +++ b/rest_framework/tests/pagination.py @@ -1,4 +1,5 @@ import datetime +from decimal import Decimal from django.core.paginator import Paginator from django.test import TestCase from django.test.client import RequestFactory @@ -83,7 +84,7 @@ class IntegrationTestPaginationAndFiltering(TestCase): """ Create 50 FilterableItem instances. """ - base_data = ('a', 0.25, datetime.date(2012, 10, 8)) + base_data = ('a', Decimal(0.25), datetime.date(2012, 10, 8)) for i in range(26): text = chr(i + ord(base_data[0])) * 3 # Produces string 'aaa', 'bbb', etc. decimal = base_data[1] + i |
