def setUp(self): base_domain = 'example.com' self.domain = Domain(base_domain) self.domain.http = Endpoint("http", "root", base_domain) self.domain.httpwww = Endpoint("http", "www", base_domain) self.domain.https = Endpoint("https", "root", base_domain) self.domain.httpswww = Endpoint("https", "www", base_domain)
def setUpClass(cls): base_domain = 'example.com' domain = Domain(base_domain) domain.http = Endpoint("http", "root", base_domain) domain.httpwww = Endpoint("http", "www", base_domain) domain.https = Endpoint("https", "root", base_domain) domain.httpswww = Endpoint("https", "www", base_domain) cls.results = _pshtt.result_for(domain) cls.temp_filename = os.path.join(tempfile.gettempdir(), 'results.csv')
def inspect(base_domain): """ Mostly copied from pshtt.pshtt.inspect() """ domain = Domain(base_domain) domain.http = Endpoint("http", "root", base_domain) domain.httpwww = Endpoint("http", "www", base_domain) domain.https = Endpoint("https", "root", base_domain) domain.httpswww = Endpoint("https", "www", base_domain) return domain # Analyze HTTP endpoint responsiveness and behavior. basic_check(domain.http) basic_check(domain.httpwww) basic_check(domain.https) basic_check(domain.httpswww) # Analyze HSTS header, if present, on each HTTPS endpoint. hsts_check(domain.https) hsts_check(domain.httpswww) return domain