Browse Source

HUE-549. Fix avro filebrowser test to run on all Python versions.

Harsh J 14 years ago
parent
commit
56c78c4eec
1 changed files with 3 additions and 1 deletions
  1. 3 1
      apps/filebrowser/src/filebrowser/views_test.py

+ 3 - 1
apps/filebrowser/src/filebrowser/views_test.py

@@ -141,7 +141,9 @@ def test_view_avro():
 
     # autodetect
     response = c.get('/filebrowser/view/test-avro-filebrowser/test-view.avro')
-    assert_equal(response.context['view']['contents'], "{u'integer': 10, u'name': u'Test'}\n")
+    # (Note: we use eval here cause of an incompatibility issue between
+    # the representation string of JSON dicts in simplejson vs. json)
+    assert_equal(eval(response.context['view']['contents']), dummy_datum)
 
     # offsetting should work as well
     response = c.get('/filebrowser/view/test-avro-filebrowser/test-view.avro?offset=1')