'The view should return 403 if the user is not logged in.'

def test_login_required(self):

    self.client.logout()
    response = self.client.get(self.path)
    self.assertEqual(response.status_code, 403)
