We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set up integration testing environment
## Problem
We need to setup an integration test environment for Mathesar, to test all user action scenarios.

## Proposed solution
Based on the discussions we've had previously (#89), the most suitable choice for us is [Playwright](https://playwright.dev/).

Integ tests require a complete mathesar setup, including a database. We should be able to test `user action -> api calls -> changes in db`.

## Additional context
- #89 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `install.py`
Content:
```
1 """
2 This script installs functions and types for Mathesar onto the configured DB.
3 """
4 from config.settings import DATABASES
5 from db import install
6 import sys
7 import getopt
8 
9 
10 def main():
11     skip_confirm = False
12     (opts, _) = getopt.getopt(sys.argv[1:], ":s", ["skip-confirm"])
13     for (opt, value) in opts:
14         if (opt == "-s") or (opt == "--skip-confirm"):
15             skip_confirm = True
16     for database_key in [key for key in DATABASES if key != "default"]:
17         install_on_db_with_key(database_key, skip_confirm)
18 
19 
20 def install_on_db_with_key(database_key, skip_confirm):
21     if DATABASES[database_key]["HOST"] == "mathesar_db":
22         # if we're going to install on the docker-created Postgres, we'll
23         # create the DB
24         print("Creating Mathesar DB on docker-created PostgreSQL instance")
25         install.create_mathesar_database(
26             DATABASES[database_key]["NAME"],
27             DATABASES["default"]["USER"],
28             DATABASES["default"]["PASSWORD"],
29             DATABASES["default"]["HOST"],
30             DATABASES["default"]["NAME"],
31             DATABASES["default"]["PORT"],
32         )
33         print(f"Created DB is {DATABASES['mathesar_tables']['NAME']}")
34     else:
35         # if we're installing anywhere else, we require the DB to exist in
36         # advance.
37         username = DATABASES[database_key]["USER"]
38         password = DATABASES[database_key]["PASSWORD"]
39         host = DATABASES[database_key]["HOST"]
40         db_name = DATABASES[database_key]["NAME"]
41         port = DATABASES[database_key]["PORT"]
42         print("Installing Mathesar DB on preexisting PostgreSQL instance...")
43         if skip_confirm is False:
44             confirmation = input(
45                 f"Mathesar will be installed on DB {db_name} at host {host}."
46                 "Confirm? (y/n) >  "
47             )
48             if (confirmation.lower() in ["y", "yes"]) or (skip_confirm is True):
49                 print("Installing...")
50                 install.install_mathesar_on_preexisting_database(
51                     username,
52                     password,
53                     host,
54                     db_name,
55                     port,
56                 )
57             else:
58                 print("Skipping DB with key {database_key}.")
59 
60 
61 if __name__ == "__main__":
62     main()
63
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/install.py b/install.py
--- a/install.py
+++ b/install.py
@@ -39,7 +39,7 @@
         host = DATABASES[database_key]["HOST"]
         db_name = DATABASES[database_key]["NAME"]
         port = DATABASES[database_key]["PORT"]
-        print("Installing Mathesar DB on preexisting PostgreSQL instance...")
+        print(f"Installing Mathesar DB {db_name} on preexisting PostgreSQL instance at host {host}...")
         if skip_confirm is False:
             confirmation = input(
                 f"Mathesar will be installed on DB {db_name} at host {host}."

{"golden_diff": "diff --git a/install.py b/install.py\n--- a/install.py\n+++ b/install.py\n@@ -39,7 +39,7 @@\n         host = DATABASES[database_key][\"HOST\"]\n         db_name = DATABASES[database_key][\"NAME\"]\n         port = DATABASES[database_key][\"PORT\"]\n-        print(\"Installing Mathesar DB on preexisting PostgreSQL instance...\")\n+        print(f\"Installing Mathesar DB {db_name} on preexisting PostgreSQL instance at host {host}...\")\n         if skip_confirm is False:\n             confirmation = input(\n                 f\"Mathesar will be installed on DB {db_name} at host {host}.\"\n", "issue": "Set up integration testing environment\n## Problem\r\nWe need to setup an integration test environment for Mathesar, to test all user action scenarios.\r\n\r\n## Proposed solution\r\nBased on the discussions we've had previously (#89), the most suitable choice for us is [Playwright](https://playwright.dev/).\r\n\r\nInteg tests require a complete mathesar setup, including a database. We should be able to test `user action -> api calls -> changes in db`.\r\n\r\n## Additional context\r\n- #89 \n", "before_files": [{"content": "\"\"\"\nThis script installs functions and types for Mathesar onto the configured DB.\n\"\"\"\nfrom config.settings import DATABASES\nfrom db import install\nimport sys\nimport getopt\n\n\ndef main():\n    skip_confirm = False\n    (opts, _) = getopt.getopt(sys.argv[1:], \":s\", [\"skip-confirm\"])\n    for (opt, value) in opts:\n        if (opt == \"-s\") or (opt == \"--skip-confirm\"):\n            skip_confirm = True\n    for database_key in [key for key in DATABASES if key != \"default\"]:\n        install_on_db_with_key(database_key, skip_confirm)\n\n\ndef install_on_db_with_key(database_key, skip_confirm):\n    if DATABASES[database_key][\"HOST\"] == \"mathesar_db\":\n        # if we're going to install on the docker-created Postgres, we'll\n        # create the DB\n        print(\"Creating Mathesar DB on docker-created PostgreSQL instance\")\n        install.create_mathesar_database(\n            DATABASES[database_key][\"NAME\"],\n            DATABASES[\"default\"][\"USER\"],\n            DATABASES[\"default\"][\"PASSWORD\"],\n            DATABASES[\"default\"][\"HOST\"],\n            DATABASES[\"default\"][\"NAME\"],\n            DATABASES[\"default\"][\"PORT\"],\n        )\n        print(f\"Created DB is {DATABASES['mathesar_tables']['NAME']}\")\n    else:\n        # if we're installing anywhere else, we require the DB to exist in\n        # advance.\n        username = DATABASES[database_key][\"USER\"]\n        password = DATABASES[database_key][\"PASSWORD\"]\n        host = DATABASES[database_key][\"HOST\"]\n        db_name = DATABASES[database_key][\"NAME\"]\n        port = DATABASES[database_key][\"PORT\"]\n        print(\"Installing Mathesar DB on preexisting PostgreSQL instance...\")\n        if skip_confirm is False:\n            confirmation = input(\n                f\"Mathesar will be installed on DB {db_name} at host {host}.\"\n                \"Confirm? (y/n) >  \"\n            )\n            if (confirmation.lower() in [\"y\", \"yes\"]) or (skip_confirm is True):\n                print(\"Installing...\")\n                install.install_mathesar_on_preexisting_database(\n                    username,\n                    password,\n                    host,\n                    db_name,\n                    port,\n                )\n            else:\n                print(\"Skipping DB with key {database_key}.\")\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "install.py"}], "after_files": [{"content": "\"\"\"\nThis script installs functions and types for Mathesar onto the configured DB.\n\"\"\"\nfrom config.settings import DATABASES\nfrom db import install\nimport sys\nimport getopt\n\n\ndef main():\n    skip_confirm = False\n    (opts, _) = getopt.getopt(sys.argv[1:], \":s\", [\"skip-confirm\"])\n    for (opt, value) in opts:\n        if (opt == \"-s\") or (opt == \"--skip-confirm\"):\n            skip_confirm = True\n    for database_key in [key for key in DATABASES if key != \"default\"]:\n        install_on_db_with_key(database_key, skip_confirm)\n\n\ndef install_on_db_with_key(database_key, skip_confirm):\n    if DATABASES[database_key][\"HOST\"] == \"mathesar_db\":\n        # if we're going to install on the docker-created Postgres, we'll\n        # create the DB\n        print(\"Creating Mathesar DB on docker-created PostgreSQL instance\")\n        install.create_mathesar_database(\n            DATABASES[database_key][\"NAME\"],\n            DATABASES[\"default\"][\"USER\"],\n            DATABASES[\"default\"][\"PASSWORD\"],\n            DATABASES[\"default\"][\"HOST\"],\n            DATABASES[\"default\"][\"NAME\"],\n            DATABASES[\"default\"][\"PORT\"],\n        )\n        print(f\"Created DB is {DATABASES['mathesar_tables']['NAME']}\")\n    else:\n        # if we're installing anywhere else, we require the DB to exist in\n        # advance.\n        username = DATABASES[database_key][\"USER\"]\n        password = DATABASES[database_key][\"PASSWORD\"]\n        host = DATABASES[database_key][\"HOST\"]\n        db_name = DATABASES[database_key][\"NAME\"]\n        port = DATABASES[database_key][\"PORT\"]\n        print(f\"Installing Mathesar DB {db_name} on preexisting PostgreSQL instance at host {host}...\")\n        if skip_confirm is False:\n            confirmation = input(\n                f\"Mathesar will be installed on DB {db_name} at host {host}.\"\n                \"Confirm? (y/n) >  \"\n            )\n            if (confirmation.lower() in [\"y\", \"yes\"]) or (skip_confirm is True):\n                print(\"Installing...\")\n                install.install_mathesar_on_preexisting_database(\n                    username,\n                    password,\n                    host,\n                    db_name,\n                    port,\n                )\n            else:\n                print(\"Skipping DB with key {database_key}.\")\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "install.py"}]}