add: more tests
This commit is contained in:
parent
6728ef9264
commit
4dd8329484
5 changed files with 166 additions and 42 deletions
tests/tavern_utils
|
@ -11,24 +11,9 @@ def multiple(response):
|
|||
for tag in response.json():
|
||||
_verify_single(tag)
|
||||
|
||||
#def find(response, name=None, number=None, controller_id=None, tag=None):
|
||||
# print(response.json())
|
||||
# for tag in response.json():
|
||||
# if number != None and number != tag.get("number"):
|
||||
# continue
|
||||
#
|
||||
# if name != None and name != tag.get("name"):
|
||||
# continue
|
||||
#
|
||||
# if controller_id != None and controller_id != tag.get("controller_id"):
|
||||
# continue
|
||||
#
|
||||
# if tag != None:
|
||||
# found_in_response = False
|
||||
# for response_tag in tag.get("tags"):
|
||||
# if response_tag == tag:
|
||||
# found_in_response = True
|
||||
# if not found_in_response:
|
||||
# continue
|
||||
# return
|
||||
# assert False, "tag not found in list"
|
||||
def find(response, tag):
|
||||
print(response.json())
|
||||
for response_tag in response.json():
|
||||
if response_tag == tag:
|
||||
return
|
||||
assert False, "tag not found in list"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue