Skip to content

Commit

Permalink
[QI2-1211] Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasKA committed Dec 30, 2024
1 parent a7de653 commit ecd0337
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qiskit_quantuminspire/qi_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, List, Union

from compute_api_client import ApiClient, BackendStatus, BackendType, BackendTypesApi
from qi2_shared.client import config
from qiskit.circuit import Instruction, Measure, QuantumCircuit
from qiskit.circuit.library import (
CCXGate,
Expand All @@ -21,7 +22,6 @@
from qiskit.providers.options import Options
from qiskit.transpiler import CouplingMap, Target

from qiskit_quantuminspire.api.client import config
from qiskit_quantuminspire.qi_jobs import QIJob
from qiskit_quantuminspire.utils import is_coupling_map_complete, run_async

Expand Down
5 changes: 4 additions & 1 deletion tests/test_qi_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
from unittest.mock import AsyncMock

import pytest
from pytest_mock import MockerFixture

from qiskit_quantuminspire.qi_backend import QIBackend
from qiskit_quantuminspire.qi_provider import QIProvider
from tests.helpers import create_backend_type


@pytest.fixture
def backend_repository(mock_job_api: Any, page_reader_mock: AsyncMock) -> None:
def backend_repository(mocker: MockerFixture, mock_job_api: Any, page_reader_mock: AsyncMock) -> None:
mocker.patch("qiskit_quantuminspire.qi_provider.config")
mocker.patch("qiskit_quantuminspire.qi_provider.ApiClient")
page_reader_mock.get_all.return_value = [
create_backend_type(name="qi_backend_1", id=10),
create_backend_type(name="spin", id=20),
Expand Down

0 comments on commit ecd0337

Please sign in to comment.