Skip to content

Commit

Permalink
Migrate to yhttp-dev >= 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Aug 18, 2024
1 parent 6a28a79 commit 4666735
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = RST303,RST304,W503
ignore = W503
per-file-ignores =
yhttp/ext/dbmanager/__init__.py: F401
tests/conftest.py: F401
tests/conftest.py: F401, F811
1 change: 1 addition & 0 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ coveralls
pytest >= 4.4.0
pytest-cov
flake8
yhttp-dev >= 3.1
17 changes: 4 additions & 13 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
import os

import pytest
from yhttp.dev.fixtures import cicd
from yhttp.ext.dbmanager import PostgresqlManager


CICD = 'CI' in os.environ \
and os.environ['CI'] \
and 'GITHUB_RUN_ID' in os.environ


@pytest.fixture
def cicd():
return CICD


@pytest.fixture
def dbmanager(cicd):
host = CICD and 'localhost' or None
user = CICD and 'postgres' or None
pass_ = CICD and 'postgres' or None
host = cicd and 'localhost' or None
user = cicd and 'postgres' or None
pass_ = cicd and 'postgres' or None
return PostgresqlManager(
host=os.environ.get('YHTTP_DB_DEFAULT_HOST', host),
user=os.environ.get('YHTTP_DB_DEFAULT_ADMINUSER', user),
Expand Down

0 comments on commit 4666735

Please sign in to comment.