File tree 3 files changed +15
-12
lines changed
3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -69,10 +69,7 @@ import os
69
69
import pytest
70
70
from FlaskTester import ft_client, ft_authenticator
71
71
72
- os.environ.update(
73
- FLASK_TESTER_ALLOW = " basic param none" ,
74
- FLASK_TESTER_APP = " app2:create_app" ,
75
- )
72
+ os.environ.update(FLASK_TESTER_ALLOW = " basic param none" )
76
73
77
74
@pytest.fixture
78
75
def app (ft_client ):
Original file line number Diff line number Diff line change @@ -21,19 +21,29 @@ SEED := $(shell head -c 33 /dev/urandom | base64)
21
21
check.external :
22
22
source $(VENV ) /bin/activate
23
23
export TEST_SEED=" $( SEED) "
24
- flask --app app:app run --port=$(PORT ) &
24
+ export FLASK_TESTER_URL=" http://localhost:$( PORT) "
25
+ # app
26
+ flask --app app run --port=$(PORT ) &
25
27
flask_pid=$$ !
26
28
sleep $(SLEEP )
27
- export FLASK_TESTER_URL=" http://localhost:$( PORT) "
28
29
$(PYTEST ) $(PYTOPT ) test_app.py
29
30
kill $$ flask_pid
31
+ # app2
32
+ flask --app app2 run --port=$(PORT ) &
33
+ flask_pid=$$ !
34
+ sleep $(SLEEP )
35
+ $(PYTEST ) $(PYTOPT ) test_app2.py
36
+ kill $$ flask_pid
30
37
31
38
.PHONY : check.internal
32
39
check.internal :
33
40
source $(VENV ) /bin/activate
34
- $( PYTEST ) $( PYTOPT ) test_app2.py
41
+ # app
35
42
export FLASK_TESTER_APP=" app"
36
43
$(PYTEST ) $(PYTOPT ) test_app.py
44
+ # app2
45
+ export FLASK_TESTER_APP=" app2:create_app"
46
+ $(PYTEST ) $(PYTOPT ) test_app2.py
37
47
38
48
.PHONY : check.coverage
39
49
check.coverage :
Original file line number Diff line number Diff line change 2
2
import pytest
3
3
from FlaskTester import ft_client , ft_authenticator
4
4
5
- # hardwired local test
6
- os .environ .update (
7
- FLASK_TESTER_ALLOW = "basic param none" ,
8
- FLASK_TESTER_APP = "app2:create_app" ,
9
- )
5
+ os .environ .update (FLASK_TESTER_ALLOW = "basic param none" )
10
6
11
7
@pytest .fixture
12
8
def app (ft_client ):
You can’t perform that action at this time.
0 commit comments