7
7
import yk_face as YKF
8
8
from yk_utils .apis import YoonikApiException
9
9
10
- from yk_face_api_models import ProcessRequestConfig
11
10
12
11
BASE_URL = os .getenv ('YK_FACE_BASE_URL' )
13
12
YKF .BaseUrl .set (BASE_URL )
@@ -42,17 +41,8 @@ def loop():
42
41
43
42
44
43
@pytest .mark .parametrize ('use_async' , [(True ,), (False ,)])
45
- @pytest .mark .parametrize ('configurations' , [
46
- [
47
- ProcessRequestConfig (name = "config1" , value = "12490812.523" ),
48
- ProcessRequestConfig (name = "config1.1" , value = "stringvalue" ),
49
- ProcessRequestConfig (name = "config2" , bvalue = True ),
50
- ProcessRequestConfig (name = "config3" , bvalue = False ),
51
- ]
52
- ])
53
44
def test_face_process_with_valid_image (
54
45
use_async : bool ,
55
- configurations ,
56
46
loop : asyncio .AbstractEventLoop
57
47
):
58
48
"""
@@ -63,10 +53,7 @@ def test_face_process_with_valid_image(
63
53
"""
64
54
if use_async :
65
55
response = loop .run_until_complete (
66
- YKF .face .process_async (
67
- __image_file ,
68
- configurations = configurations
69
- )
56
+ YKF .face .process_async (__image_file )
70
57
)
71
58
else :
72
59
response = YKF .face .process (__image_file )
@@ -85,17 +72,8 @@ def test_face_process_with_valid_image(
85
72
86
73
87
74
@pytest .mark .parametrize ('use_async' , [(True ,), (False ,)])
88
- @pytest .mark .parametrize ('configurations' , [
89
- [
90
- ProcessRequestConfig (name = "config1" , value = "12490812.523" ),
91
- ProcessRequestConfig (name = "config1.1" , value = "stringvalue" ),
92
- ProcessRequestConfig (name = "config2" , bvalue = True ),
93
- ProcessRequestConfig (name = "config3" , bvalue = False ),
94
- ]
95
- ])
96
75
def test_face_process_with_invalid_image (
97
76
use_async : bool ,
98
- configurations ,
99
77
loop : asyncio .AbstractEventLoop
100
78
):
101
79
"""
@@ -106,8 +84,7 @@ def test_face_process_with_invalid_image(
106
84
"""
107
85
with pytest .raises (YoonikApiException ) as exception :
108
86
if use_async :
109
- loop .run_until_complete (YKF .face .process_async (random_str (),
110
- configurations = configurations ))
87
+ loop .run_until_complete (YKF .face .process_async (random_str ()))
111
88
else :
112
89
YKF .face .process (random_str ())
113
90
assert exception .value .status_code == 409
0 commit comments