learningequality/ka-lite — pull request #584 by bcipolli (2013-08-27 05:15:22+00:00)
Title: Test updates and more utils => shared refactoring

I set out to make tests work tonight. There were two blocking factors that I had to solve:
1. our cache "monkey-patching" isn't working. So, we'll have to destroy the cache for the system being tested. No biggie.

2. our CONTENT_ROOT monkey patching generally works, except for functions inside utils/videos.py. There, we hard-code access to settings, and use them in a funky way. The solution I chose was to create two versions of functions that need app-specific paths: one in shared that assume those paths, then pass those paths to more generic functions contained in utils. This follows the logic outlined in #253 , that we're slowly migrating towards.

Testing:
1. Tests now work!
2. Tested the four codepaths that this affects manually: video_update (download videos, delete videos), videoscan, videodownload. All work like champs. Also did greps to make sure everything was migrated over to use shared/videos.py