@@ -142,18 +142,12 @@ def test_db_no_autocommit_executemany(sentry_init, client, capture_events):
142142 assert commit_span ["origin" ] == "auto.db.django"
143143
144144 # Verify other database attributes
145- assert commit_span ["data" ].get (SPANDATA .DB_SYSTEM ) == "postgresql "
146- conn_params = connections [ "postgres" ] .get_connection_params ()
145+ assert commit_span ["data" ].get (SPANDATA .DB_SYSTEM ) == "sqlite "
146+ conn_params = connection .get_connection_params ()
147147 assert commit_span ["data" ].get (SPANDATA .DB_NAME ) is not None
148148 assert commit_span ["data" ].get (SPANDATA .DB_NAME ) == conn_params .get (
149149 "database"
150150 ) or conn_params .get ("dbname" )
151- assert commit_span ["data" ].get (SPANDATA .SERVER_ADDRESS ) == os .environ .get (
152- "SENTRY_PYTHON_TEST_POSTGRES_HOST" , "localhost"
153- )
154- assert commit_span ["data" ].get (SPANDATA .SERVER_PORT ) == os .environ .get (
155- "SENTRY_PYTHON_TEST_POSTGRES_PORT" , "5432"
156- )
157151
158152
159153@pytest .mark .forked
@@ -271,14 +265,8 @@ def test_db_atomic_executemany(sentry_init, client, capture_events):
271265
272266 # Verify other database attributes
273267 assert commit_span ["data" ].get (SPANDATA .DB_SYSTEM ) == "sqlite"
274- conn_params = connections [ "postgres" ] .get_connection_params ()
268+ conn_params = connection .get_connection_params ()
275269 assert commit_span ["data" ].get (SPANDATA .DB_NAME ) is not None
276270 assert commit_span ["data" ].get (SPANDATA .DB_NAME ) == conn_params .get (
277271 "database"
278272 ) or conn_params .get ("dbname" )
279- assert commit_span ["data" ].get (SPANDATA .SERVER_ADDRESS ) == os .environ .get (
280- "SENTRY_PYTHON_TEST_POSTGRES_HOST" , "localhost"
281- )
282- assert commit_span ["data" ].get (SPANDATA .SERVER_PORT ) == os .environ .get (
283- "SENTRY_PYTHON_TEST_POSTGRES_PORT" , "5432"
284- )
0 commit comments