Exemplo n.º 1
0
 def test_get_power_status_true(self, mocked_post, mocked_get):
     versions = [1, 2, 3, 4]
     device = self.create_device()
     device.actionlist_url = ACTION_LIST_URL
     device.base_url = BASE_URL
     for version in versions:
         device.api_version = version
         self.assertTrue(device.get_power_status())
Exemplo n.º 2
0
 def test_get_power_status_error(self, mocked_request_error):
     device = self.create_device()
     device.api_version = 4
     self.assertFalse(device.get_power_status())
Exemplo n.º 3
0
 def test_get_power_status_error2(self, mocked_requests_post):
     device = self.create_device()
     device.api_version = 4
     device.base_url = REQUESTS_ERROR
     device.actionlist_url = ACTION_LIST_URL
     self.assertFalse(device.get_power_status())
Exemplo n.º 4
0
 def test_get_power_status_false(self):
     versions = [1, 2, 3, 4]
     device = self.create_device()
     for version in versions:
         device.api_version = version
         self.assertFalse(device.get_power_status())