From 951d555634cccc9d4902e4cba6b117bb12c1c6f9 Mon Sep 17 00:00:00 2001 From: Shawn Milochik Date: Fri, 17 Jul 2015 11:43:10 -0400 Subject: [PATCH] Fixed comparison of FileFields to strings. fixes #376 Also explicitly sorts instead of depending on chance. --- importer/tests/test_import.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/importer/tests/test_import.py b/importer/tests/test_import.py index 9cceb379..defa836f 100644 --- a/importer/tests/test_import.py +++ b/importer/tests/test_import.py @@ -286,9 +286,10 @@ def get_counts(): ).distinct() self.assertEqual(htmls.count(), 1) self.assertEqual( - [asset.asset for asset in htmls[0].static_assets.all()], - [ + sorted([ + asset.asset.name for asset in htmls[0].static_assets.all()]), + sorted([ "assets/edX/toy/TT_2012_Fall/essays_x250.png", "assets/edX/toy/TT_2012_Fall/webGLDemo.css", - ] + ]) )