示例#1
0
 def test_remote_os_found(self, m):
     headers = {"X-Distribution": "Ubuntu"}
     m.register_uri("GET", "http://example.com", headers=headers)
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = remote_os(test)
     self.assertEqual("SERVER_OS_UBUNTU", signal.slug)
示例#2
0
 def test_remote_os_found(self, m):
     headers = {"X-Distribution": "Ubuntu"}
     m.register_uri("GET", "http://example.com", headers=headers)
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = remote_os(test)
     self.assertEqual("SERVER_OS_UBUNTU", signal.slug)
示例#3
0
 def test_remote_os_not_found(self, m):
     m.register_uri("GET", "http://example.com")
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = remote_os(test)
     self.assertEqual("SERVER_OS_UNKNOWN", signal.slug)
示例#4
0
 def test_remote_os_not_found(self, m):
     m.register_uri("GET", "http://example.com")
     resp = requests.get("http://example.com")
     test = FakeTestObject(resp)
     signal = remote_os(test)
     self.assertEqual("SERVER_OS_UNKNOWN", signal.slug)