<s> from . import util <EOL> from okcupyd import User , photo <EOL> @ util . use_cassette ( path = '<STR_LIT>' , <EOL> match_on = util . match_on_no_body ) <EOL> def test_photo_upload ( ) : <EOL> uploader = photo . PhotoUploader ( ) <EOL> upload_response_dict = uploader . upload_and_confirm ( '<STR_LIT>' ) <EOL> assert int ( upload_response_dict [ '<STR_LIT:id>' ] ) > <NUM_LIT:0> <EOL> @ util . use_cassette ( path = '<STR_LIT>' , match_on = util . match_on_no_body ) <EOL> def test_photo_delete ( ) : <EOL> user = User ( ) <EOL> response_dict = user . photo . upload_and_confirm ( user . quickmatch ( ) . photo_infos [ <NUM_LIT:0> ] ) <EOL> before_delete_photos = user . profile . photo_infos <EOL> user . photo . delete ( response_dict [ '<STR_LIT:id>' ] ) <EOL> user . profile . refresh ( ) <EOL> assert len ( before_delete_photos ) - <NUM_LIT:1> == len ( user . profile . photo_infos ) <EOL> def test_make_photo_uri_from_https_link ( ) : <EOL> photo_info = photo . Info . from_cdn_uri ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> assert photo_info . id == <NUM_LIT> <EOL> assert photo_info . thumb_nail_top == <NUM_LIT> <EOL> @ util . use_cassette <EOL> def test_photo_info_upload ( vcr_live_sleep ) : <EOL> user = User ( ) <EOL> response = user . photo . upload_and_confirm ( user . quickmatch ( ) . photo_infos [ <NUM_LIT:0> ] ) <EOL> vcr_live_sleep ( <NUM_LIT:2> ) <EOL> assert int ( response [ '<STR_LIT:id>' ] ) in [ pi . id for pi in user . profile . photo_infos ] </s>
