def test_deletes_folder_on_success(self): storage = FileSystemStorage(os.path.dirname(__file__)) storage.create_folder(self.path) storage.delete_folder(self.path) assert not os.path.exists(self.path)
def test_raises_exception_if_folder_does_not_exist(self): storage = FileSystemStorage(os.path.dirname(__file__)) with raises(StorageException): storage.delete_folder(self.path)