# 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
)
		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()
	   
		value_regex = re.compile(r'\d+[\.]\d+')        
		assert isinstance(network_data, dict)
		for key, value in network_data.iteritems():
			assert key not in ['lo', 'IFACE']
			for k in value.keys():
				assert k in ['inbound', 'outbound']

			for k, v in value.items():

# 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
)

		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()
	   
		value_regex = re.compile(r'\d+[\.]\d+')        
		assert isinstance(network_data, dict)
		for key, value in network_data.iteritems():
			assert key not in ['lo', 'IFACE']
			for k in value.keys():
				assert k in ['inbound', 'outbound']

			for k, v in value.items():

				assert re.match(value_regex, v)