def test_decrypt_exception(self): import pyconcrete print pyconcrete.__file__ data = 'abc' self.assertLess(len(data), 16) with self.assertRaises(pyconcrete._pyconcrete.Error): pyconcrete.decrypt_buffer(data)
def test_decrypt_exception(self): import pyconcrete print(pyconcrete.__file__) data = 'abc' self.assertLess(len(data), 16) with self.assertRaises(pyconcrete._pyconcrete.Error): pyconcrete.decrypt_buffer(data)
def __do_encrypt_decrypt_file(self, py_code): py_filepath = self.lib_gen_py(py_code, 'test.py') pye_filepath = py_filepath + 'e' import pyconcrete pyconcrete.encrypt_file(py_filepath, pye_filepath) with open(pye_filepath, 'rb') as f: data = f.read() return pyconcrete.decrypt_buffer(data)