Exemplo n.º 1
0
 def test_temporary_file(self):
     a = GLSecureTemporaryFile(GLSettings.tmp_upload_path)
     antani = "0123456789" * 10000
     a.write(antani)
     self.assertTrue(antani == a.read())
     a.close()
     self.assertFalse(os.path.exists(a.filepath))
Exemplo n.º 2
0
 def test_temporary_file_write_after_read(self):
     a = GLSecureTemporaryFile(GLSettings.tmp_upload_path)
     antani = "0123456789" * 10000
     a.write(antani)
     self.assertTrue(antani == a.read())
     self.assertRaises(AssertionError, a.write, antani)
     a.close()
Exemplo n.º 3
0
 def test_temporary_file_write_after_read(self):
     a = GLSecureTemporaryFile(GLSettings.tmp_upload_path)
     antani = "0123456789" * 10000
     a.write(antani)
     self.assertTrue(antani == a.read())
     self.assertRaises(AssertionError, a.write, antani)
     a.close()
Exemplo n.º 4
0
 def test_temporary_file(self):
     a = GLSecureTemporaryFile(GLSettings.tmp_upload_path)
     antani = "0123456789" * 10000
     a.write(antani)
     self.assertTrue(antani == a.read())
     a.close()
     self.assertFalse(os.path.exists(a.filepath))