def testExecutePythonEnvironment(self):
    """Test the basic ExecutePython action."""

    python_code = """
import StringIO
import uu

def decode(encoded):
  # Use the import (uu) inside a function. This will fail if the environment
  # for exec is not set up properly.
  i = StringIO.StringIO(s)
  o = StringIO.StringIO()
  uu.decode(i, o)
  return o.getvalue()

s = "626567696e20363636202d0a2c3226354c3b265c4035565d523b2630410a200a656e640a"
s = s.decode("hex")

magic_return_str = decode(s)
"""
    signed_blob = rdf_crypto.SignedBlob()
    signed_blob.Sign(python_code, self.signing_key)
    request = rdf_client.ExecutePythonRequest(python_code=signed_blob)
    result = self.RunAction("ExecutePython", request)[0]

    self.assertTrue(0 > result.time_used)
    self.assertEqual(result.return_val, "Hello World!")
dataset/ETHPy150Open google/grr/grr/client/client_actions/standard_test.py/TestExecutePython.testExecutePythonEnvironment/swapped operands of `>`