File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -129,29 +129,22 @@ def hasUrl(self) -> List[str]:
129
129
"""
130
130
return self .hasString (URL_REGEX , True )
131
131
132
- def getParamValues (self ) -> Tuple [ str , str ]:
133
- """Get first and second parameter values from behavior.
132
+ def getParamValues (self ) -> List [ str ]:
133
+ """Get parameter values from behavior.
134
134
135
- :return: strings of first and second parameter values
135
+ :return: python containing parameter values
136
136
"""
137
137
allResult = self .hasString (".*" , True )
138
138
139
- secondParam = None
140
- firstParam = None
139
+ paramValues = []
141
140
for result in allResult :
142
141
if result [0 ] == "(" and result [- 1 ] == ")" and \
143
142
self .firstAPI .innerObj .class_name in result and \
144
143
self .secondAPI .innerObj .class_name in result :
145
144
146
- params = result [1 :- 1 ].split ("," )[1 :]
147
- secondParam = None
145
+ paramValues = result [1 :- 1 ].split ("," )[1 :]
148
146
149
- if len (params ) >= 1 :
150
- firstParam = params [0 ]
151
- if len (params ) >= 2 :
152
- secondParam = params [1 ]
153
-
154
- return firstParam , secondParam
147
+ return paramValues
155
148
156
149
157
150
class QuarkResult :
Original file line number Diff line number Diff line change @@ -181,9 +181,7 @@ def testGetParamValues(QUARK_ANALYSIS_RESULT):
181
181
)
182
182
)
183
183
184
- first_api , second_api = behavior .getParamValues ()
185
-
186
- assert first_api == "ping www.baidu.com" and second_api is None
184
+ assert behavior .getParamValues ()[0 ] == "ping www.baidu.com"
187
185
188
186
189
187
class TestQuarkReuslt :
You can’t perform that action at this time.
0 commit comments