diff --git a/test/test_mock_solver_loading.py b/test/test_mock_solver_loading.py
index <HASH>..<HASH> 100644
--- a/test/test_mock_solver_loading.py
+++ b/test/test_mock_solver_loading.py
@@ -7,6 +7,7 @@ import unittest
 import requests_mock
 
 import dwave_micro_client
+from dwave_micro_client import InvalidAPIResponseError
 
 try:
     import unittest.mock as mock
@@ -135,7 +136,7 @@ class MockSolverLoading(unittest.TestCase):
         with requests_mock.mock() as m:
             m.get(solver1_url, text=solver_object(solver_name, True))
             con = dwave_micro_client.Connection(url, token)
-            with self.assertRaises(KeyError):
+            with self.assertRaises(InvalidAPIResponseError):
                 con.get_solver(solver_name)
 
     def test_load_solver_broken_response(self):
Fix unit test for case of a solver with invalid structure