def test_bit_type(): """ Test the bit type (32 or 64 bit arch) of the OS. """ bit_type = systeminfo.bit_type() plat_bit_type = platform.architecture()[0][:2] eq_(bit_type, plat_bit_type, "Bit types don't match: %s != %s" % (bit_type, plat_bit_type)) assert bit_type in ['64', '32'], "%s not supported." % bit_type
def system_info(self): root = {} root['os_code'] = systeminfo.code() root['os_string'] = systeminfo.name() root['version'] = systeminfo.version() root['bit_type'] = systeminfo.bit_type() root['computer_name'] = systeminfo.computer_name() root['host_name'] = '' # TODO(urgent): Implement logger.debug("System info sent: {0}".format(json.dumps(root))) return root