'Tests the end to end Rekall memory analysis.'

@RequireTestImage
def testRekallModules(self):

    request = rdf_rekall_types.RekallRequest()
    request.plugins = [rdf_rekall_types.PluginRequest(plugin='pslist', args=dict(method=['PsActiveProcessHead', 'CSRSS'])), rdf_rekall_types.PluginRequest(plugin='modules')]
    session_id = self.LaunchRekallPlugin(request)
    fd = flow.GRRFlow.ResultCollectionForFID(session_id, token=self.token)
    json_blobs = []
    for x in fd:
        self.assertEqual(x.client_urn, self.client_id)
        json_blobs.append(x.json_messages)
    json_blobs = ''.join(json_blobs)
    for knownresult in ['DumpIt.exe', 'DumpIt.sys']:
        self.assertTrue((knownresult in json_blobs))
