From d866f2177e92f10a554a7dfd7eee9d93d67927be Mon Sep 17 00:00:00 2001 From: markotibold Date: Sun, 20 Mar 2011 10:37:38 +0100 Subject: fix compat with python 2.5 --- examples/pygments_api/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples/pygments_api/tests.py') diff --git a/examples/pygments_api/tests.py b/examples/pygments_api/tests.py index 0036345c..017823b9 100644 --- a/examples/pygments_api/tests.py +++ b/examples/pygments_api/tests.py @@ -1,7 +1,12 @@ from django.test import TestCase from djangorestframework.compat import RequestFactory from pygments_api import views -import tempfile, shutil, json +import tempfile, shutil + +try: + import json +except ImportError: + import simplejson as json class TestPygmentsExample(TestCase): -- cgit v1.2.3