From fe438bec27cb85db73fa0efc1c1e3af660dd6a57 Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Thu, 17 Oct 2013 11:08:25 -0400 Subject: [PATCH] Ensure contentstore has no assets before generating test set --- cms/djangoapps/contentstore/tests/test_assets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cms/djangoapps/contentstore/tests/test_assets.py b/cms/djangoapps/contentstore/tests/test_assets.py index 8803f85789..4169e41d42 100644 --- a/cms/djangoapps/contentstore/tests/test_assets.py +++ b/cms/djangoapps/contentstore/tests/test_assets.py @@ -174,6 +174,8 @@ class TestAssetIndex(CourseTestCase): course_filter = Location( XASSET_LOCATION_TAG, category='asset', course=self.course.location.course, org=self.course.location.org ) + # purge existing entries (a bit brutal but hopefully tests are independent enuf to not trip on this) + cstore.fs_files.remove(course_filter.dict()) base_entry = { 'displayname': 'foo.jpg', 'chunkSize': 262144,