Added tests for cascade deletions.

These tests fail with unpatched Django which is why we
have switched to using our branch that contains a fix
until the fix is merged upstream.