From 62735e3378ac00903a3a8d4b3905ae09e909cb36 Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Thu, 5 Dec 2024 11:27:50 -0500 Subject: [PATCH] Update test_refresh_method (#2074) --- qiskit_ibm_runtime/fake_provider/fake_backend.py | 5 +---- test/integration/test_fake_backends.py | 7 ------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/qiskit_ibm_runtime/fake_provider/fake_backend.py b/qiskit_ibm_runtime/fake_provider/fake_backend.py index 60d6c7f9a..81d6c91f1 100644 --- a/qiskit_ibm_runtime/fake_provider/fake_backend.py +++ b/qiskit_ibm_runtime/fake_provider/fake_backend.py @@ -585,7 +585,6 @@ def refresh(self, service: QiskitRuntimeService) -> None: " required to retrieve the real backend's current properties and settings." ) - version = self.backend_version prod_name = self.backend_name.replace("fake", "ibm") try: backends = service.backends(prod_name) @@ -633,10 +632,8 @@ def refresh(self, service: QiskitRuntimeService) -> None: ) logger.info( - "The backend %s has been updated from version %s to %s version.", + "The backend %s has been updated with the latest data from the server.", self.backend_name, - version, - real_props.backend_version, ) except Exception as ex: # pylint: disable=broad-except diff --git a/test/integration/test_fake_backends.py b/test/integration/test_fake_backends.py index d0567ba8c..7900647f1 100644 --- a/test/integration/test_fake_backends.py +++ b/test/integration/test_fake_backends.py @@ -175,13 +175,6 @@ def test_refresh_method(self): old_backend.refresh(self.service) self.assertIn("The backend fake_sherbrooke has been updated", logs.output[0]) - # to verify the data files are currently updated that there is nothing to refresh - # create another instance of FakeSherbrooke updated above - new_backend = FakeSherbrooke() - with self.assertLogs("qiskit_ibm_runtime", level="INFO") as logs: - new_backend.refresh(self.service) - self.assertIn("There are no available new updates for fake_sherbrooke", logs.output[0]) - # to verify the refresh can't be done wrong_backend = FakeSherbrooke() # set a non-existent backend name