From e8d5cb2acb2e5302ee966c9ec016a9da8a36b79c Mon Sep 17 00:00:00 2001 From: G Johansson Date: Sat, 16 Aug 2025 16:00:04 +0000 Subject: [PATCH] Remove fixture --- tests/components/sql/conftest.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/tests/components/sql/conftest.py b/tests/components/sql/conftest.py index 3dc78b7a171..9d18a7ddd79 100644 --- a/tests/components/sql/conftest.py +++ b/tests/components/sql/conftest.py @@ -3,14 +3,10 @@ from __future__ import annotations from collections.abc import Generator -from pathlib import Path -import sqlite3 from unittest.mock import AsyncMock, patch import pytest -from homeassistant.core import HomeAssistant - @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock]: @@ -19,23 +15,3 @@ def mock_setup_entry() -> Generator[AsyncMock]: "homeassistant.components.sql.async_setup_entry", return_value=True ) as mock_setup_entry: yield mock_setup_entry - - -@pytest.fixture -async def create_db( - hass: HomeAssistant, - tmp_path: Path, -) -> str: - """Test the SQL sensor with a query that returns no value.""" - db_path = tmp_path / "test.db" - db_path_str = f"sqlite:///{db_path}" - - def make_test_db(): - """Create a test database.""" - conn = sqlite3.connect(db_path) - conn.execute("CREATE TABLE users (value INTEGER)") - conn.commit() - conn.close() - - await hass.async_add_executor_job(make_test_db) - return db_path_str