'Test we can get a GRR client artifact.'

def testRunGrrClientActionArtifact(self):

    with utils.Stubber(psutil, 'process_iter', ProcessIter):
        client_mock = action_mocks.ActionMock(standard.ListProcesses)
        client = aff4.FACTORY.Open(self.client_id, token=self.token, mode='rw')
        client.Set(client.Schema.SYSTEM('Linux'))
        client.Flush()
        coll1 = artifact_registry.ArtifactSource(type=artifact_registry.ArtifactSource.SourceType.GRR_CLIENT_ACTION, attributes={'client_action': standard.ListProcesses.__name__})
        self.fakeartifact.sources.append(coll1)
        artifact_list = ['FakeArtifact']
        for s in flow_test_lib.TestFlowHelper(collectors.ArtifactCollectorFlow.__name__, client_mock, artifact_list=artifact_list, token=self.token, client_id=self.client_id):
            session_id = s
        fd = flow.GRRFlow.ResultCollectionForFID(session_id, token=self.token)
        self.assertTrue(isinstance(list(fd)[0], rdf_client.Process))
        self.assertTrue((len(fd) == 1))
