diff options
| author | markotibold | 2011-03-20 11:56:43 +0100 | 
|---|---|---|
| committer | markotibold | 2011-03-20 11:56:43 +0100 | 
| commit | b4a076c8226223bb650605f4d04609f1f59b5913 (patch) | |
| tree | cc29250830890e01ecb506c6406c579066a172be /examples | |
| parent | d866f2177e92f10a554a7dfd7eee9d93d67927be (diff) | |
| download | django-rest-framework-b4a076c8226223bb650605f4d04609f1f59b5913.tar.bz2 | |
fixing compat with py25
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/blogpost/tests.py | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/blogpost/tests.py b/examples/blogpost/tests.py index 3cc1aed0..dfb4d5f5 100644 --- a/examples/blogpost/tests.py +++ b/examples/blogpost/tests.py @@ -165,7 +165,10 @@ class AllowedMethodsTests(TestCase):  #above testcases need to probably moved to the core  from djangorestframework.compat import RequestFactory -import json +try: +    import json +except ImportError: +    import simplejson as json  class TestRotation(TestCase):      """For the example the maximum amount of Blogposts is capped off at views.MAX_POSTS.   | 
