Skip to content

Commit

Permalink
remove tests for django version prior to 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
deronnax committed Nov 6, 2013
1 parent ae58615 commit 3c7ce47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 1 addition & 4 deletions tastypie/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,7 @@ def to_json(self, data, options=None):
options = options or {}
data = self.to_simple(data, options)

if django.get_version() >= '1.5':
return djangojson.json.dumps(data, cls=djangojson.DjangoJSONEncoder, sort_keys=True, ensure_ascii=False)
else:
return json.dumps(data, cls=djangojson.DjangoJSONEncoder, sort_keys=True, ensure_ascii=False)
return djangojson.json.dumps(data, cls=djangojson.DjangoJSONEncoder, sort_keys=True, ensure_ascii=False)

def from_json(self, content):
"""
Expand Down
7 changes: 2 additions & 5 deletions tests/customuser/tests/custom_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
class CustomUserTestCase(TestCase):
fixtures = ['custom_user.json']
def setUp(self):
if django_version() < '1.5':
self.skipTest('This test requires Django 1.5 or higher')
else:
super(CustomUserTestCase, self).setUp()
ApiKey.objects.all().delete()
super(CustomUserTestCase, self).setUp()
ApiKey.objects.all().delete()

def test_is_authenticated_get_params(self):
from django.contrib.auth.tests import CustomUser
Expand Down

0 comments on commit 3c7ce47

Please sign in to comment.