Ejemplo n.º 1
0
 def test_server_software_found(self, m):
     headers = {"Server": "WSGIServer"}
     m.register_uri("GET", "http://example.com", headers=headers)
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = server_software(test)
     self.assertEqual("SERVER_SOFTWARE_WSGI", signal.slug)
Ejemplo n.º 2
0
 def test_server_software_found(self, m):
     headers = {"Server": "WSGIServer"}
     m.register_uri("GET", "http://example.com", headers=headers)
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = server_software(test)
     self.assertEqual("SERVER_SOFTWARE_WSGI", signal.slug)
Ejemplo n.º 3
0
 def test_server_software_not_found(self, m):
     m.register_uri("GET", "http://example.com")
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = server_software(test)
     self.assertEqual("SERVER_SOFTWARE_UNKNOWN", signal.slug)
Ejemplo n.º 4
0
 def test_server_software_not_found(self, m):
     m.register_uri("GET", "http://example.com")
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = server_software(test)
     self.assertEqual("SERVER_SOFTWARE_UNKNOWN", signal.slug)