# Path: amonagent/modules/core.py
# def get_cpu_info():
# def get_ip_address():	
# def get_uptime():
# def get_memory_info():
# 	def parse_output(self, df_output):
# 		def keep_device(device):
# 	def _is_number(self, a_string):
# 	def _check_blocks(self, blocks):
# 	def _is_real_device(self, device):
# 	def _flatten_devices(self, devices):
# 	def check(self):
# def get_network_traffic():
# def get_load_average():
# def get_cpu_utilization():
# 	MINUTE  = 60
# 	HOUR    = MINUTE * 60
# 	DAY     = HOUR * 24
# class DiskCheck(object):


import sys
import re
import socket
from amonagent.modules.core import (
	get_uptime,
	get_memory_info,
	get_cpu_utilization,
	get_load_average,
	get_network_traffic,
	get_ip_address,
	get_cpu_info, 
	disk_check
)

		for v in cpu.values():
			# Could be 1.10 - 4, 10.10 - 5, 100.00 - 6
			assert len(v) == 4 or len(v) == 5 or len(v) == 6

			value_regex = re.compile(r'\d+[\.]\d+')
			assert re.match(value_regex, v)


	def test_loadavg(self):
		loadavg = get_load_average()

		assert 'minute' in loadavg
		assert 'five_minutes' in loadavg
		assert 'fifteen_minutes' in loadavg
		assert 'cores' in loadavg


		assert isinstance(loadavg['cores'], int)
		assert isinstance(loadavg['minute'], str)
		assert isinstance(loadavg['five_minutes'], str)
		assert isinstance(loadavg['fifteen_minutes'], str)
		
		value_regex = re.compile(r'\d+[\.]\d+')

		assert re.match(value_regex, loadavg['minute'])
		assert re.match(value_regex, loadavg['five_minutes'])
		assert re.match(value_regex, loadavg['fifteen_minutes'])

	def test_network(self):

# Path: amonagent/modules/core.py
# def get_cpu_info():
# def get_ip_address():	
# def get_uptime():
# def get_memory_info():
# 	def parse_output(self, df_output):
# 		def keep_device(device):
# 	def _is_number(self, a_string):
# 	def _check_blocks(self, blocks):
# 	def _is_real_device(self, device):
# 	def _flatten_devices(self, devices):
# 	def check(self):
# def get_network_traffic():
# def get_load_average():
# def get_cpu_utilization():
# 	MINUTE  = 60
# 	HOUR    = MINUTE * 60
# 	DAY     = HOUR * 24
# class DiskCheck(object):


# Path: tests/modules_core_test.py
import sys
import re
import socket
from amonagent.modules.core import (
	get_uptime,
	get_memory_info,
	get_cpu_utilization,
	get_load_average,
	get_network_traffic,
	get_ip_address,
	get_cpu_info, 
	disk_check
)


		for v in cpu.values():
			# Could be 1.10 - 4, 10.10 - 5, 100.00 - 6
			assert len(v) == 4 or len(v) == 5 or len(v) == 6

			value_regex = re.compile(r'\d+[\.]\d+')
			assert re.match(value_regex, v)


	def test_loadavg(self):
		loadavg = get_load_average()

		assert 'minute' in loadavg
		assert 'five_minutes' in loadavg
		assert 'fifteen_minutes' in loadavg
		assert 'cores' in loadavg


		assert isinstance(loadavg['cores'], int)
		assert isinstance(loadavg['minute'], str)
		assert isinstance(loadavg['five_minutes'], str)
		assert isinstance(loadavg['fifteen_minutes'], str)
		
		value_regex = re.compile(r'\d+[\.]\d+')

		assert re.match(value_regex, loadavg['minute'])
		assert re.match(value_regex, loadavg['five_minutes'])
		assert re.match(value_regex, loadavg['fifteen_minutes'])

	def test_network(self):

		network_data = get_network_traffic()