from django.test import TestCase # Create your tests here. import requests headers = { 'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Mobile Safari/537.36' } url = "http://192.168.1.4/" response = requests.get(url=url, headers=headers) print(response.status_code)