def test_system(self): system_info = runner.system() cpu = backend.get_collection('cpu') cpu.remove() memory = backend.get_collection('memory') memory.remove() loadavg = backend.get_collection('loadavg') loadavg.remove() disk = backend.get_collection('disk') disk.remove() network = backend.get_collection('network') network.remove() backend.store_entries(system_info) eq_(1, cpu.count()) eq_(1, memory.count()) eq_(1, loadavg.count()) eq_(1, disk.count()) if sys.platform != 'darwin': eq_(1, network.count())
def test_system_run(self): system_test = runner.system() assert isinstance(system_test, dict) if sys.platform != 'darwin': assert 'network' in system_test assert 'memory' in system_test assert 'cpu' in system_test assert 'disk' in system_test assert 'loadavg' in system_test