def test_application_authorization(self):
        client = Client()

        response = client.get(
            path = reverse('home')
        )

        # There's no way to derive the view the response originated from in Django,
        # so verifying its status code will have to suffice.
        assert response.status_code == 401

        response = client.get(
            path = reverse('redirect')
        )

        # Verify that the URL the user is redirected to will in turn redirect to
        # "http://example.org".
        assert_contains("example.org", response.content)
Verify that the user is redirected to authorize the application
dataset/ETHPy150Open jgorset/fandjango/tests/test_fandjango.py/TestFacebookWebMiddleware.test_application_authorization