Example #1
0
 def _RunQuery(self, plist_file="test.plist", query=u"", context=""):
     path = os.path.join(self.base_path, plist_file)
     pathspec = rdf_paths.PathSpec(path=path,
                                   pathtype=rdf_paths.PathSpec.PathType.OS)
     plistrequest = rdf_plist.PlistRequest()
     plistrequest.query = query
     plistrequest.context = context
     plistrequest.pathspec = pathspec
     return self.RunAction(plist.PlistQuery, plistrequest)
Example #2
0
    def _RunFlow(self, client_id, flow_name, context=None, query=None):
        client_mock = action_mocks.ActionMock(plist.PlistQuery)
        request = rdf_plist.PlistRequest(context=context, query=query)
        request.pathspec.path = os.path.join(self.base_path, "test.plist")
        request.pathspec.pathtype = rdf_paths.PathSpec.PathType.OS

        session_id = flow_test_lib.TestFlowHelper(flow_name,
                                                  client_mock,
                                                  client_id=client_id,
                                                  creator=self.test_username,
                                                  request=request)

        return session_id