def test_extract_CPU_info(self): info = ["CPU", "x86", "GenuineIntel family 6 model 22 stepping 1", 1] d = DotDict() bpj._extract_CPU_info(info, d) self.assertTrue("system_info" in d) self.assertEqual( d.system_info, {"cpu_arch": "x86", "cpu_info": "GenuineIntel family 6 model 22 stepping 1", "cpu_count": 1} )
def test_extract_CPU_info(self): info = ['CPU', 'x86', 'GenuineIntel family 6 model 22 stepping 1', 1] d = DotDict() bpj._extract_CPU_info(info, d) assert 'system_info' in d expected = { "cpu_arch": 'x86', "cpu_info": 'GenuineIntel family 6 model 22 stepping 1', "cpu_count": 1 } assert d.system_info == expected
def test_extract_CPU_info(self): info = ['CPU', 'x86', 'GenuineIntel family 6 model 22 stepping 1', 1] d = DotDict() bpj._extract_CPU_info(info, d) ok_('system_info' in d) eq_( d.system_info, { "cpu_arch": 'x86', "cpu_info": 'GenuineIntel family 6 model 22 stepping 1', "cpu_count": 1 } )
def test_extract_OS_and_CPU_info(self): info = ['OS', 'Windows NT', '5.1.2600 Service Pack 2'] d = DotDict() bpj._extract_OS_info(info, d) info = ['CPU', 'x86', 'GenuineIntel family 6 model 22 stepping 1', 1] bpj._extract_CPU_info(info, d) assert 'system_info' in d expected = { 'os': 'Windows NT', 'os_ver': '5.1.2600 Service Pack 2', "cpu_arch": 'x86', "cpu_info": 'GenuineIntel family 6 model 22 stepping 1', "cpu_count": 1 } assert d.system_info == expected
def test_extract_OS_and_CPU_info(self): info = ["OS", "Windows NT", "5.1.2600 Service Pack 2"] d = DotDict() bpj._extract_OS_info(info, d) info = ["CPU", "x86", "GenuineIntel family 6 model 22 stepping 1", 1] bpj._extract_CPU_info(info, d) self.assertTrue("system_info" in d) self.assertEqual( d.system_info, { "os": "Windows NT", "os_ver": "5.1.2600 Service Pack 2", "cpu_arch": "x86", "cpu_info": "GenuineIntel family 6 model 22 stepping 1", "cpu_count": 1, }, )