def test_testprofile_set_dmesg_false(): """profile.TestProfile: Dmesg returns a DummyDmesg if set to False""" utils.platform_check("linux") profile_ = profile.TestProfile() profile_.dmesg = True profile_.dmesg = False nt.ok_(isinstance(profile_.dmesg, dmesg.DummyDmesg))
def test_get_dmesg_linux(): """dmesg.get_dmesg: Returns a LinuxDmesg when not_dummy is True and the OS is Linux """ utils.platform_check('linux') posix = _get_dmesg() nt.assert_is(type(posix), dmesg.LinuxDmesg, msg=("Error: get_dmesg should have returned LinuxDmesg, " "but it actually returned {}".format(type(posix))))
def test_root_lspci(self): """JSON: lspci is a root key.""" utils.platform_check('linux') utils.binary_check('lspci') nt.assert_in('lspci', self.json)
def test_root_glxinfo(self): """JSON: glxinfo is a root key.""" utils.platform_check('linux') utils.binary_check('glxinfo') nt.assert_in('glxinfo', self.json)
def test_root_uname(self): """JSON: uname is a root key.""" utils.platform_check('linux') utils.binary_check('uname') nt.assert_in('uname', self.json)
def test_testprofile_set_dmesg_true(): """profile.TestProfile: Dmesg returns an apropriate dmesg is ste to True""" utils.platform_check("linux") profile_ = profile.TestProfile() profile_.dmesg = True nt.ok_(isinstance(profile_.dmesg, dmesg.LinuxDmesg))