grr/server/grr_response_server/flows/general/collectors_test.py
def testGetArtifact(self):
    """Test we can get a basic artifact."""
    # Dynamically add an ArtifactSource specifying the base path.
    file_path = os.path.join(self.base_path, "hello.exe")
    coll1 = rdf_artifacts.ArtifactSource(
        type=rdf_artifacts.ArtifactSource.SourceType.FILE,
        attributes={"paths": [file_path]})
    self.fakeartifact.sources.append(coll1)

    self._GetArtifact("FakeArtifact")
Test we can get a basic artifact.
Test we can get a basic artifact.
Test we can get a basic artifact .
def testGetArtifact(self):
    file_path = os.path.join(self.base_path, "hello.exe")
    coll1 = rdf_artifacts.ArtifactSource(
        type=rdf_artifacts.ArtifactSource.SourceType.FILE,
        attributes={"paths": [file_path]})
    self.fakeartifact.sources.append(coll1)
    self._GetArtifact("FakeArtifact")
def testGetArtifact ( self ) : file_path = os . path . join ( self . base_path , "hello.exe" ) coll1 = rdf_artifacts . ArtifactSource ( type = rdf_artifacts . ArtifactSource . SourceType . FILE , attributes = { "paths" : [ file_path ] } ) self . fakeartifact . sources . append ( coll1 ) self . _GetArtifact ( "FakeArtifact" )
Test we can get a basic artifact.
Test we can get a basic artifact .
"""Test we can get a basic artifact.""" # Dynamically add an ArtifactSource specifying the base path.
self