

def testKnowlegeBaseUsersAttributesExpandIntoLists(self):
    kb = rdf_client.KnowledgeBase()
    kb.users.append(rdf_client.User(appdata='the_appdata_1', localappdata='the_localappdata_1', userdomain='the_userdomain_1', userprofile='the_userprofile_1'))
    kb.users.append(rdf_client.User(appdata='the_appdata_2', localappdata='the_localappdata_2', userdomain='the_userdomain_2', userprofile='the_userprofile_2'))
    mapping = artifact_utils.GetWindowsEnvironmentVariablesMap(kb)
    self.assertEqual(mapping, {
        'appdata': ['the_appdata_1', 'the_appdata_2'],
        'localappdata': ['the_localappdata_1', 'the_localappdata_2'],
        'userdomain': ['the_userdomain_1', 'the_userdomain_2'],
        'userprofile': ['the_userprofile_1', 'the_userprofile_2'],
    })

dataset/ETHPy150Open google/grr/grr/lib/artifact_utils_test.py GetWindowsEnvironmentVariablesMapTest.testKnowlegeBaseUsersAttributesExpandIntoLists/original