def test_auth_required(self):
    'Test that authentication is required'
    res = self.client.get(RECIPE_URL)
    self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)
Test that authentication is required
def test_auth_required(self):
    
    res = self.client.get(RECIPE_URL)
    self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)