def METHOD_NAME(self):
    """test detail view"""
    # get object
    ip_1 = Ip.objects.get(ip_ip='127.0.0.1')
    # create url
    destination = '/login/?next=' + urllib.parse.quote(
        '/ip/' + str(ip_1.ip_id) + '/', safe=''
    )
    # get response
    response = self.client.get('/ip/' + str(ip_1.ip_id) + '/', follow=True)
    # compare
    self.assertRedirects(
        response, destination, status_code=302, target_status_code=200
    )