Exemplo n.º 1
0
 def test_update_service_urls_v4(self, mocked_requests_post,
                                 mocked_requests_get):
     device = self.create_device()
     device.pin = 1234
     device.api_version = 4
     device._update_service_urls()
     self.assertEqual(device.mac, "10:08:B1:31:81:B5")
Exemplo n.º 2
0
 def test_update_service_urls_v3(self, mock_ircc, mock_action_list,
                                 mock_system_information,
                                 mocked_requests_get):
     device = self.create_device()
     device.pin = 1234
     device._update_service_urls()
     self.assertEqual(mock_ircc.call_count, 1)
     self.assertEqual(mock_action_list.call_count, 1)
     self.assertEqual(mock_system_information.call_count, 1)
Exemplo n.º 3
0
 def test_update_service_urls_error_processing(self, mock_error,
                                               mocked_requests_get):
     device = self.create_device()
     device._update_service_urls()
     self.assertEqual(mock_error.call_count, 1)
Exemplo n.º 4
0
 def test_update_service_urls_request_exception(self,
                                                mock_request_exception):
     device = self.create_device()
     device._update_service_urls()
     self.assertEqual(mock_request_exception.call_count, 1)
Exemplo n.º 5
0
 def test_update_service_urls_error_response(self):
     device = self.create_device()
     device._update_service_urls()