I'd rewrite this checking both the original status_code (404) and the 'fixed' one (302)::

        response = self.client.get('%s?cms-toolbar-logout' % child_page.get_absolute_url())
        self.assertNotEqual(response.status_code, 404)
        self.assertEqual(response.status_code, 302)
        self.assertTrue(response['Location'].find(settings.LOGIN_URL) > -1)