def test_oembed_single_gplus_photo(self): from app import oembed_single url_ = """https://plus.google.com/photos/115212051037621986145/albums/5416758372025392817/5416759231776841970""" self.mock_data("5416758372025392817", "single_gplus_photo.json") input_ = {} input_["userid"], input_["albumid"], input_["photoid"] = searches.ALBUMID_PHOTO_EXTRACT.search(url_).groups() input_["maxwidth"] = 640 input_["maxheight"] = 480 self.assertEqual(oembed_single(input_), self.load_data("result_gplus_photo.json"))
def test_oembed_single_gplus_video(self): from app import oembed_single url_ = """https://plus.google.com/photos/100642868990821651444/albums/5720909216955340593/5720909218315234178""" self.mock_data("5720909216955340593", "single_gplus_video.json") input_ = {} input_["userid"], input_["albumid"], input_["photoid"] = searches.ALBUMID_PHOTO_EXTRACT.search(url_).groups() input_["maxwidth"] = 640 input_["maxheight"] = 480 self.assertEqual(oembed_single(input_), self.load_data("result_gplus_video.json"))
def test_oembed_single_gplus_video(self): from app import oembed_single url_ = """https://plus.google.com/photos/100642868990821651444/albums/5720909216955340593/5720909218315234178""" self.mock_data('5720909216955340593', 'single_gplus_video.json') input_ = {} input_['userid'], input_['albumid'], input_['photoid'] = \ searches.ALBUMID_PHOTO_EXTRACT.search(url_).groups() input_['maxwidth'] = 640 input_['maxheight'] = 480 self.assertEqual(oembed_single(input_), self.load_data('result_gplus_video.json'))
def test_oembed_single_picasa_video(self): from app import oembed_single, albumname2id self.mock_data('5064748777194404144', 'single_picasa_video.json') url_ = """https://picasaweb.google.com/111415681122206252267/August31201202#5782876989650158754""" input_ = {} input_['userid'], input_['albumname'], input_['photoid'] = \ searches.ALBUMNAME_PHOTO_EXTRACT.search(url_).groups() input_['albumid'] = albumname2id(input_) input_['maxwidth'] = 640 input_['maxheight'] = 480 self.assertEqual(oembed_single(input_), self.load_data('result_single_picasa_video.json'))
def test_oembed_single_picasa_video(self): from app import oembed_single, albumname2id self.mock_data("5064748777194404144", "single_picasa_video.json") url_ = """https://picasaweb.google.com/111415681122206252267/August31201202#5782876989650158754""" input_ = {} input_["userid"], input_["albumname"], input_["photoid"] = searches.ALBUMNAME_PHOTO_EXTRACT.search( url_ ).groups() input_["albumid"] = albumname2id(input_) input_["maxwidth"] = 640 input_["maxheight"] = 480 self.assertEqual(oembed_single(input_), self.load_data("result_single_picasa_video.json"))
def test_oembed_single_gplus_photo(self): from app import oembed_single url_ = """https://plus.google.com/photos/115212051037621986145/albums/5416758372025392817/5416759231776841970""" self.mock_data('5416758372025392817', 'single_gplus_photo.json') input_ = {} input_['userid'], input_['albumid'], input_['photoid'] = \ searches.ALBUMID_PHOTO_EXTRACT.search(url_).groups() input_['maxwidth'] = 640 input_['maxheight'] = 480 self.assertEqual(oembed_single(input_), self.load_data('result_gplus_photo.json'))