edx/xblock-sdk — pull request #10 by singingwolfboy (2014-04-19 19:19:49+00:00)
Title: Support Django 1.5

This pull request allows The XBlock SDK to run under Django 1.5. However, test failures are showing up due to test isolation issues. Running the tests on their own will cause them to pass -- running the full suite results in failures on Django 1.5.

I don't yet understand why the tests fail, but I've made some progress:
* [The release notes for Django 1.5](https://docs.djangoproject.com/en/1.6/releases/1.5/) say that it introduces some changes in the order that tests are run, but that appears to only be relevant for doctests.
* The tests fail when they run after a test that uses [`django.test.LiveServerTestCase`](https://docs.djangoproject.com/en/1.5/topics/testing/overview/#django.test.LiveServerTestCase) (or anything that inherits from it, like `workbench.test.SeleniumTest`). When you disable `test_problems.py` and `test_thumbs.py`, the remaining tests pass. Creating a new test suite that inherits directly from `LiveServerTestCase` but does nothing, is enough to cause other tests to fail again.
* When the failure occurs, it is because XBlocks with children are not rendering their children. This is because the children are not getting attached to their parent blocks in the first place -- or perhaps they are getting overwritten or removed somehow.
* This issue is present on both Django 1.5 and 1.6. (This pull request only adds support for Django 1.5, to reduce the scope of finding the issue.)