Url audit #107

Merged
merged 2 commits into from Jan 11, 2013

Projects

None yet

2 participants

@Osmose
Mozilla member

Removes URLs that won't be needed for the new site and fixes the tests to accommodate these changes.

@pmclanahan pmclanahan commented on an outdated diff Jan 8, 2013
flicks/base/tests/test_views.py
@@ -1,7 +1,7 @@
from funfactory.urlresolvers import reverse
from nose.tools import eq_
-from flicks.base.tests import TestCase
+from flicks.base.tests import skip, TestCase
@pmclanahan
pmclanahan Jan 8, 2013

Django includes unittest2, which includes a skip decorator.

from django.utils.unittest import skip

@pmclanahan pmclanahan commented on the diff Jan 8, 2013
flicks/videos/tests/test_forms.py
@@ -95,17 +98,19 @@ def test_invalid_content_type(self, head):
valid.
"""
head.return_value = self._response(200, 'invalid/type; charset=UTF-8')
- form = self._form();
@pmclanahan
Mozilla member

Apart from the mass destruction of urls, which was apparently the goal, this looks good.

I won't say you need to delete the custom skip decorator since it was already in there, but it seems redundant given that unittest2 is available.

r+

Osmose added some commits Jan 8, 2013
@Osmose Osmose Fix Bug 822364: Remove old URLs from urlconfs. d5b67e2
@Osmose Osmose Bug 822364: Skip tests for views that aren't in the urlconf.
- Skips tests that rely on the urls that were removed from the urlconf.
- Fixes an issue with the 404 and 500 pages where they would cause test
  failures when encountered during a test because, during tests, the 
  built-in error views are used, and they don't use RequestContext, 
  which the error templates relied on.
416f603
@Osmose Osmose merged commit 416f603 into mozilla:master Jan 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment