File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 1
1
[flake8]
2
- ignore = RST303,RST304, W503
2
+ ignore = W503
3
3
per-file-ignores =
4
4
yhttp/ext/dbmanager/__init__.py: F401
5
- tests/conftest.py: F401
5
+ tests/conftest.py: F401, F811
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ coveralls
6
6
pytest >= 4.4.0
7
7
pytest-cov
8
8
flake8
9
+ yhttp-dev >= 3.1
Original file line number Diff line number Diff line change 1
1
import os
2
2
3
3
import pytest
4
+ from yhttp .dev .fixtures import cicd
4
5
from yhttp .ext .dbmanager import PostgresqlManager
5
6
6
7
7
- CICD = 'CI' in os .environ \
8
- and os .environ ['CI' ] \
9
- and 'GITHUB_RUN_ID' in os .environ
10
-
11
-
12
- @pytest .fixture
13
- def cicd ():
14
- return CICD
15
-
16
-
17
8
@pytest .fixture
18
9
def dbmanager (cicd ):
19
- host = CICD and 'localhost' or None
20
- user = CICD and 'postgres' or None
21
- pass_ = CICD and 'postgres' or None
10
+ host = cicd and 'localhost' or None
11
+ user = cicd and 'postgres' or None
12
+ pass_ = cicd and 'postgres' or None
22
13
return PostgresqlManager (
23
14
host = os .environ .get ('YHTTP_DB_DEFAULT_HOST' , host ),
24
15
user = os .environ .get ('YHTTP_DB_DEFAULT_ADMINUSER' , user ),
You can’t perform that action at this time.
0 commit comments