From c6d76ef576dd3cb960bb5f66f88cf8ea457f36ff Mon Sep 17 00:00:00 2001 From: pylover Date: Mon, 19 Aug 2024 00:22:32 +0330 Subject: [PATCH] Fix: Github actions postgresql connection --- tests/test_cli.py | 8 +++----- tests/test_dbmanager.py | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 1e45802..aa1a3d9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -6,7 +6,6 @@ from yhttp.core import Application from yhttp.ext.dbmanager import install -from .conftest import CICD class Bar(easycli.SubCommand): @@ -29,10 +28,9 @@ def test_applicationcli(cicd): cliapp = CLIApplication('example', 'tests.test_cli:app.climain') env = os.environ.copy() if cicd: - env['YHTTP_DB_DEFAULT_HOST'] = host - env['YHTTP_DB_DEFAULT_ADMINUSER'] = user - env['YHTTP_DB_DEFAULT_ADMINPASS'] = pass_ - + env.setdefault('YHTTP_DB_DEFAULT_HOST', 'localhost') + env.setdefault('YHTTP_DB_DEFAULT_ADMINUSER', 'postgres') + env.setdefault('YHTTP_DB_DEFAULT_ADMINPASS', 'postgres') with Given(cliapp, 'db', environ=env): assert stderr == '' diff --git a/tests/test_dbmanager.py b/tests/test_dbmanager.py index 27052d0..53b5a03 100644 --- a/tests/test_dbmanager.py +++ b/tests/test_dbmanager.py @@ -1,6 +1,3 @@ -from yhttp.ext.dbmanager import PostgresqlManager - - DBNAME = 'yhttp-postgesql-testing'