def test_oembed_album_gplus(self): from app import oembed_album url_ = """https://plus.google.com/photos/115212051037621986145/albums/5416758372025392817""" self.mock_data("5064748777194404169", "album_gplus.json") input_ = {} input_["userid"], input_["albumid"] = searches.ALBUMID_ONLY_EXTRACT.search(url_).groups() input_["maxwidth"] = 640 input_["maxheight"] = 480 self.assertEqual(oembed_album(input_), self.load_data("result_album_gplus.json"))
def test_oembed_album_gplus(self): from app import oembed_album url_ = """https://plus.google.com/photos/115212051037621986145/albums/5416758372025392817""" self.mock_data('5064748777194404169', 'album_gplus.json') input_ = {} input_['userid'], input_['albumid'] = \ searches.ALBUMID_ONLY_EXTRACT.search(url_).groups() input_['maxwidth'] = 640 input_['maxheight'] = 480 self.assertEqual(oembed_album(input_), self.load_data('result_album_gplus.json'))
def test_oembed_album_picasa(self): from app import oembed_album, albumname2id self.mock_data("5064748777194404169", "album_picasa.json") url_ = "https://picasaweb.google.com/111415681122206252267/Sasha02" input_ = {} input_["userid"], input_["albumname"] = searches.ALBUMNAME_ONLY_EXTRACT.search(url_).groups() input_["albumid"] = albumname2id(input_) input_["maxwidth"] = 640 input_["maxheight"] = 480 self.assertEqual(oembed_album(input_), self.load_data("result_album_picasa.json"))
def test_oembed_album_picasa(self): from app import oembed_album, albumname2id self.mock_data('5064748777194404169', 'album_picasa.json') url_ = "https://picasaweb.google.com/111415681122206252267/Sasha02" input_ = {} input_['userid'], input_['albumname'] = \ searches.ALBUMNAME_ONLY_EXTRACT.search(url_).groups() input_['albumid'] = albumname2id(input_) input_['maxwidth'] = 640 input_['maxheight'] = 480 self.assertEqual(oembed_album(input_), self.load_data('result_album_picasa.json'))