Exemplo n.º 1
0
 def test_path(self):
     file_name = "thumbnails-63e453f1-9655-49ad-acba-ff7f27c49e9d"
     self.assertEquals(
         file_store.path(file_store.pictures, file_name),
         os.path.join(
             self.preview_path, "pictures/thumbnails/63e/453/"
             "63e453f1-9655-49ad-acba-ff7f27c49e9d"))
Exemplo n.º 2
0
 def test_add_and_open_picture(self):
     file_path_fixture = self.get_fixture_file_path("thumbnails/th01.png")
     file_store.add_picture("thumbnails",
                            "63e453f1-9655-49ad-acba-ff7f27c49e9d",
                            file_path_fixture)
     file_name = "thumbnails-63e453f1-9655-49ad-acba-ff7f27c49e9d"
     result_path = file_store.path(file_store.pictures, file_name)
     self.assertTrue(os.path.exists(result_path))