Skip to content

Commit

Permalink
Fix test code typos; QPU → simulator.
Browse files Browse the repository at this point in the history
  • Loading branch information
snuffkin committed Oct 8, 2024
1 parent 86874cb commit 2eddcb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/tests/oqtopus_cloud/common/test_model_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def _get_model_dict():
return {
"id": "SVSim",
"device_type": "QPU",
"device_type": "simulator",
"status": "AVAILABLE",
"restart_at": datetime(2023, 1, 2, 12, 34, 56),
"pending_tasks": 8,
Expand Down
12 changes: 6 additions & 6 deletions backend/tests/oqtopus_cloud/user/routers/test_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from datetime import datetime
from typing import Dict

from fastapi.testclient import TestClient
from oqtopus_cloud.common.models.device import (
Device,
)
from oqtopus_cloud.user.lambda_function import app
from oqtopus_cloud.user.routers.devices import get_device, model_to_schema
from oqtopus_cloud.user.schemas.devices import CalibrationData, DeviceInfo
from fastapi.testclient import TestClient
from zoneinfo import ZoneInfo

jst = ZoneInfo("Asia/Tokyo")
Expand Down Expand Up @@ -50,7 +50,7 @@ def _get_calibration_data() -> CalibrationData:
def _get_model():
mode_dict = {
"id": "SVSim",
"device_type": "QPU",
"device_type": "simulator",
"status": "AVAILABLE",
"restart_at": datetime(2023, 1, 2, 12, 34, 56),
"pending_tasks": 8,
Expand All @@ -76,7 +76,7 @@ def test_get_device(test_db):
# Assert
expected = DeviceInfo(
deviceId="SVSim",
deviceType="QPU",
deviceType="simulator",
status="AVAILABLE",
restartAt=datetime(2023, 1, 2, 12, 34, 56, tzinfo=jst),
nPendingTasks=8,
Expand All @@ -101,7 +101,7 @@ def test_model_to_shema():
# Assert
expected = DeviceInfo(
deviceId="SVSim",
deviceType="QPU",
deviceType="simulator",
status="AVAILABLE",
restartAt=datetime(2023, 1, 2, 12, 34, 56, tzinfo=jst),
nPendingTasks=8,
Expand All @@ -127,7 +127,7 @@ def test_get_device_hadler(test_db):
# Assert
expected = {
"deviceId": "SVSim",
"deviceType": "QPU",
"deviceType": "simulator",
"status": "AVAILABLE",
"restartAt": "2023-01-02T12:34:56+09:00",
"nPendingTasks": 8,
Expand Down Expand Up @@ -157,7 +157,7 @@ def test_get_task_200(
):
device = Device(
id="1",
device_type="QPU",
device_type="simulator",
status="AVAILABLE",
n_qubits=1,
n_nodes=1,
Expand Down
4 changes: 2 additions & 2 deletions backend/tests/oqtopus_cloud/user/routers/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# """
# device = Device(
# id="1",
# device_type="QPU",
# device_type="simulator",
# status="AVAILABLE",
# n_qubits=1,
# n_nodes=1,
Expand Down Expand Up @@ -94,7 +94,7 @@
# """
# device = Device(
# id="1",
# device_type="QPU",
# device_type="simulator",
# status="AVAILABLE",
# n_qubits=1,
# n_nodes=1,
Expand Down

0 comments on commit 2eddcb5

Please sign in to comment.