@@ -241,9 +241,9 @@ def temp_mysql_database():
241241 jdbc_url = (
242242 f"jdbc:mysql://{ mysql_container .get_container_host_ip ()} :"
243243 f"{ mysql_container .get_exposed_port (mysql_container .port )} /"
244- f"{ mysql_container .MYSQL_DATABASE } ?"
245- f"user={ mysql_container .MYSQL_USER } &"
246- f"password={ mysql_container .MYSQL_PASSWORD } " )
244+ f"{ mysql_container .dbname } ?"
245+ f"user={ mysql_container .username } &"
246+ f"password={ mysql_container .password } " )
247247
248248 yield jdbc_url
249249 except mysql .connector .Error as err :
@@ -290,9 +290,9 @@ def temp_postgres_database():
290290 jdbc_url = (
291291 f"jdbc:postgresql://{ postgres_container .get_container_host_ip ()} :"
292292 f"{ postgres_container .get_exposed_port (default_port )} /"
293- f"{ postgres_container .POSTGRES_DB } ?"
294- f"user={ postgres_container .POSTGRES_USER } &"
295- f"password={ postgres_container .POSTGRES_PASSWORD } " )
293+ f"{ postgres_container .dbname } ?"
294+ f"user={ postgres_container .username } &"
295+ f"password={ postgres_container .password } " )
296296
297297 yield jdbc_url
298298 except (psycopg2 .Error , Exception ) as err :
@@ -347,9 +347,9 @@ def temp_sqlserver_database():
347347 jdbc_url = (
348348 f"jdbc:sqlserver://{ sqlserver_container .get_container_host_ip ()} :"
349349 f"{ int (sqlserver_container .get_exposed_port (default_port ))} ;"
350- f"databaseName={ sqlserver_container .SQLSERVER_DBNAME } ;"
351- f"user={ sqlserver_container .SQLSERVER_USER } ;"
352- f"password={ sqlserver_container .SQLSERVER_PASSWORD } ;"
350+ f"databaseName={ sqlserver_container .dbname } ;"
351+ f"user={ sqlserver_container .username } ;"
352+ f"password={ sqlserver_container .password } ;"
353353 f"encrypt=true;"
354354 f"trustServerCertificate=true" )
355355
0 commit comments