Ejemplo n.º 1
0
 def test_delete_failed(self, size_filename_content_data):
     (size, filename, content) = size_filename_content_data
     file_storage = FileStorage(size)
     assert not file_storage.delete(filename)
Ejemplo n.º 2
0
 def test_delete_success(self, size_filename_content_data):
     (size, filename, content) = size_filename_content_data
     file_storage = FileStorage(size)
     file = File(filename, content)
     file_storage.write(file)
     assert file_storage.delete(file.get_filename()) and file not in file_storage.get_files()