

def testGetArtifactNames(self):
    self._LoadAllArtifacts()
    result_objs = artifact_registry.REGISTRY.GetArtifacts(os_name='Windows', provides=['users.homedir', 'domain'])
    results_names = artifact_registry.REGISTRY.GetArtifactNames(os_name='Windows', provides=['users.homedir', 'domain'])
    self.assertItemsEqual(set([a.name for a in result_objs]), results_names)
    self.assertTrue(len(results_names))
    results_names = artifact_registry.REGISTRY.GetArtifactNames(os_name='Darwin', provides=['users.username'])
    self.assertItemsEqual(set(['OSXUsers']), results_names)

dataset/ETHPy150Open google/grr/grr/lib/artifact_utils_test.py ArtifactHandlingTest.testGetArtifactNames/original