

def testLoginRequired(self, view_url='/login_required/', login_url='/login/'):
    '\n        Check that login_required works on a simple view wrapped in a\n        login_required decorator.\n        '
    response = self.client.get(view_url)
    self.assertEqual(response.status_code, 302)
    self.assertTrue((login_url in response['Location']))
    view_url.login()
    response = self.client.get(view_url)
    self.assertEqual(response.status_code, 200)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/auth/tests/decorators.py LoginRequiredTestCase.testLoginRequired/VarMisuse@56/115 `self`->`view_url`