Exemple #1
0
 def test_empty_media(self):
     g = GoogleAlbumMedia(json.loads('{"emptyJson":"0"}'))
     self.assertEqual(0, g.size)
     self.assertEqual('none', g.mime_type)
     self.assertEqual('none', g.description)
     self.assertEqual(None, g.create_date)
     self.assertEqual(None, g.modify_date)
     # noinspection PyBroadException
     try:
         _ = g.url
         assert False, "empty album url should throw"
     except Exception:
         pass
     self.assertEqual(Path('') / '', g.full_folder)
     g.duplicate_number = 1
     self.assertEqual('none (2)', g.filename)
Exemple #2
0
 def test_google_albums_media(self):
     m = GoogleAlbumMedia("")
     g = GoogleAlbumsRow(None)
     g.from_media(m)