grr/server/grr_response_server/artifact_test.py
def testKnowledgeBaseRetrievalLinuxNoUsers(self):
    """Cause a users.username dependency failure."""
    with test_lib.ConfigOverrider({
        "Artifacts.knowledge_base": [
            "NetgroupConfiguration", "NssCacheLinuxPasswdHomedirs",
            "LinuxRelease"
        ],
        "Artifacts.netgroup_filter_regexes": ["^doesntexist$"]
    }):
      with vfs_test_lib.FakeTestDataVFSOverrider():
        with test_lib.SuppressLogs():
          kb = self._RunKBI(require_complete=False)

    self.assertEqual(kb.os_major_version, 14)
    self.assertEqual(kb.os_minor_version, 4)
    self.assertCountEqual([x.username for x in kb.users], [])
Cause a users.username dependency failure.
Cause a users.username dependency failure.
Cause a users . username dependency failure .
def testKnowledgeBaseRetrievalLinuxNoUsers(self):
    with test_lib.ConfigOverrider({
        "Artifacts.knowledge_base": [
            "NetgroupConfiguration", "NssCacheLinuxPasswdHomedirs",
            "LinuxRelease"
        ],
        "Artifacts.netgroup_filter_regexes": ["^doesntexist$"]
    }):
      with vfs_test_lib.FakeTestDataVFSOverrider():
        with test_lib.SuppressLogs():
          kb = self._RunKBI(require_complete=False)
    self.assertEqual(kb.os_major_version, 14)
    self.assertEqual(kb.os_minor_version, 4)
    self.assertCountEqual([x.username for x in kb.users], [])
def testKnowledgeBaseRetrievalLinuxNoUsers ( self ) : with test_lib . ConfigOverrider ( { "Artifacts.knowledge_base" : [ "NetgroupConfiguration" , "NssCacheLinuxPasswdHomedirs" , "LinuxRelease" ] , "Artifacts.netgroup_filter_regexes" : [ "^doesntexist$" ] } ) : with vfs_test_lib . FakeTestDataVFSOverrider ( ) : with test_lib . SuppressLogs ( ) : kb = self . _RunKBI ( require_complete = False ) self . assertEqual ( kb . os_major_version , 14 ) self . assertEqual ( kb . os_minor_version , 4 ) self . assertCountEqual ( [ x . username for x in kb . users ] , [ ] )
Cause a users.username dependency failure.
Cause a users . username dependency failure .
"""Cause a users.username dependency failure."""
self