prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Individually run API tests don't build tables database
  ## Description
  Running a individual test in `mathesar` that doesn't use the `engine` or `test_db` fixture will not have the tables databases built for the test. As a result, many will error when trying to access the tables database.
  
  ## Expected behavior
  The tables database should always be built.
  
  ## To Reproduce
  Run any test in `mathesar` that doesn't use `engine` or `test_db`. Ex:
  ```
  docker exec mathesar_web_1 pytest mathesar/tests/views/api/test_schema_api.py::test_schema_update
  ```
  
  ## Additional context
  Introduced due to the changes in #329, since `pytest-django` no longer creates the tables db for us.
  
  
  </issue>
  <code>
  [start of conftest.py]
  1 """
  2 This file should provide utilities for setting up test DBs and the like.  It's
  3 intended to be the containment zone for anything specific about the testing
  4 environment (e.g., the login info for the Postgres instance for testing)
  5 """
  6 import pytest
  7 from sqlalchemy import create_engine, text
  8 from config.settings import DATABASES
  9 
  10 TEST_DB = "mathesar_db_test"
  11 
  12 
  13 @pytest.fixture(scope="session")
  14 def test_db_name():
  15     return TEST_DB
  16 
  17 
  18 @pytest.fixture(scope="session")
  19 def test_db():
  20     superuser_engine = _get_superuser_engine()
  21     with superuser_engine.connect() as conn:
  22         conn.execution_options(isolation_level="AUTOCOMMIT")
  23         conn.execute(text(f"DROP DATABASE IF EXISTS {TEST_DB} WITH (FORCE)"))
  24         conn.execute(text(f"CREATE DATABASE {TEST_DB}"))
  25     yield TEST_DB
  26     with superuser_engine.connect() as conn:
  27         conn.execution_options(isolation_level="AUTOCOMMIT")
  28         conn.execute(text(f"DROP DATABASE {TEST_DB} WITH (FORCE)"))
  29 
  30 
  31 @pytest.fixture(scope="session")
  32 def engine(test_db):
  33     return create_engine(
  34         _get_connection_string(
  35             DATABASES["default"]["USER"],
  36             DATABASES["default"]["PASSWORD"],
  37             DATABASES["default"]["HOST"],
  38             test_db,
  39         ),
  40         future=True,
  41     )
  42 
  43 
  44 def _get_superuser_engine():
  45     return create_engine(
  46         _get_connection_string(
  47             username=DATABASES["default"]["USER"],
  48             password=DATABASES["default"]["PASSWORD"],
  49             hostname=DATABASES["default"]["HOST"],
  50             database=DATABASES["default"]["NAME"],
  51         ),
  52         future=True,
  53     )
  54 
  55 
  56 def _get_connection_string(username, password, hostname, database):
  57     return f"postgresql://{username}:{password}@{hostname}/{database}"
  58
  [end of conftest.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/conftest.py b/conftest.py
  --- a/conftest.py
  +++ b/conftest.py
  @@ -15,7 +15,7 @@
       return TEST_DB
   
   
  -@pytest.fixture(scope="session")
  +@pytest.fixture(scope="session", autouse=True)
   def test_db():
       superuser_engine = _get_superuser_engine()
       with superuser_engine.connect() as conn:
  
verification_info: {"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -15,7 +15,7 @@\n     return TEST_DB\n \n \n-@pytest.fixture(scope=\"session\")\n+@pytest.fixture(scope=\"session\", autouse=True)\n def test_db():\n     superuser_engine = _get_superuser_engine()\n     with superuser_engine.connect() as conn:\n", "issue": "Individually run API tests don't build tables database\n## Description\r\nRunning a individual test in `mathesar` that doesn't use the `engine` or `test_db` fixture will not have the tables databases built for the test. As a result, many will error when trying to access the tables database.\r\n\r\n## Expected behavior\r\nThe tables database should always be built.\r\n\r\n## To Reproduce\r\nRun any test in `mathesar` that doesn't use `engine` or `test_db`. Ex:\r\n```\r\ndocker exec mathesar_web_1 pytest mathesar/tests/views/api/test_schema_api.py::test_schema_update\r\n```\r\n\r\n## Additional context\r\nIntroduced due to the changes in #329, since `pytest-django` no longer creates the tables db for us.\r\n\n", "before_files": [{"content": "\"\"\"\nThis file should provide utilities for setting up test DBs and the like.  It's\nintended to be the containment zone for anything specific about the testing\nenvironment (e.g., the login info for the Postgres instance for testing)\n\"\"\"\nimport pytest\nfrom sqlalchemy import create_engine, text\nfrom config.settings import DATABASES\n\nTEST_DB = \"mathesar_db_test\"\n\n\n@pytest.fixture(scope=\"session\")\ndef test_db_name():\n    return TEST_DB\n\n\n@pytest.fixture(scope=\"session\")\ndef test_db():\n    superuser_engine = _get_superuser_engine()\n    with superuser_engine.connect() as conn:\n        conn.execution_options(isolation_level=\"AUTOCOMMIT\")\n        conn.execute(text(f\"DROP DATABASE IF EXISTS {TEST_DB} WITH (FORCE)\"))\n        conn.execute(text(f\"CREATE DATABASE {TEST_DB}\"))\n    yield TEST_DB\n    with superuser_engine.connect() as conn:\n        conn.execution_options(isolation_level=\"AUTOCOMMIT\")\n        conn.execute(text(f\"DROP DATABASE {TEST_DB} WITH (FORCE)\"))\n\n\n@pytest.fixture(scope=\"session\")\ndef engine(test_db):\n    return create_engine(\n        _get_connection_string(\n            DATABASES[\"default\"][\"USER\"],\n            DATABASES[\"default\"][\"PASSWORD\"],\n            DATABASES[\"default\"][\"HOST\"],\n            test_db,\n        ),\n        future=True,\n    )\n\n\ndef _get_superuser_engine():\n    return create_engine(\n        _get_connection_string(\n            username=DATABASES[\"default\"][\"USER\"],\n            password=DATABASES[\"default\"][\"PASSWORD\"],\n            hostname=DATABASES[\"default\"][\"HOST\"],\n            database=DATABASES[\"default\"][\"NAME\"],\n        ),\n        future=True,\n    )\n\n\ndef _get_connection_string(username, password, hostname, database):\n    return f\"postgresql://{username}:{password}@{hostname}/{database}\"\n", "path": "conftest.py"}]}