

def test_authentication(self):
    SilkyConfig().SILKY_AUTHENTICATION = True
    response = self.client.get(silky_reverse('requests'))
    self.assertEqual(response.status_code, 302)
    try:
        url = response.url
    except AttributeError:
        url = response['location']
    try:
        self.assertIn(reverse('login'), url)
    except NoReverseMatch:
        self.assertIn('http://testserver/login/', url)

dataset/ETHPy150Open django-silk/silk/project/tests/test_config_auth.py TestAuth.test_authentication/original