'Tests that leading slash, trailing slash, and {locale}/docs/
are removed if included'

def test_form_properly_strips_leading_cruft(self):

    comparisons = [['/somedoc', 'somedoc'], ['/en-US/docs/mynewplace', 'mynewplace'], ['/docs/one', 'one'], ['docs/one', 'one'], ['fr/docs/one', 'one'], ['docs/article-title/docs', 'article-title/docs'], ['/en-US/docs/something/', 'something']]
    for comparison in comparisons:
        form = TreeMoveForm({'locale': 'en-US', 'title': 'Article', 'slug': comparison[0]})
        form.is_valid()
        self.assertEqual(comparison[1], form.cleaned_data['slug'])
