Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Return the user value from user_setup function
Browse files Browse the repository at this point in the history
Returned the user value from the user_setup function.
  • Loading branch information
leni1 committed May 8, 2018
1 parent 44bb193 commit ee51f99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/server/test_image_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,24 @@
# Hack to make this predictable:
random.seed(0)


def image_setup():
for image in example_images:
valid_data_image = image['url']
return valid_data_image


def user_setup():
with screenshots_session() as user:
shot_id = make_random_id() + "/test.com"
shot_data = urljoin(user.backend, "data/" + shot_id)
shot_json = make_example_shot(user.deviceId)
return shot_data, shot_json
return (shot_data, shot_json, user)


def test_invalid_data_image():
image = image_setup()
(shot_data, shot_json) = user_setup()
(shot_data, shot_json, user) = user_setup()
if "iVBORw0KGgo" in image:
invalid_data_image = image.replace('iVBORw0KGgo', 'R0k')
for clip_id in shot_json['clips']:
Expand Down

0 comments on commit ee51f99

Please sign in to comment.