import utils
import unittest
import os
import config

class AK130_TestCase(unittest.TestCase):
	def __log(self, msg):
		if config.logfile:
			config.logfile.write(msg)

	def setUp(self):
		self.__log("---- %s start ----\n" % self._testMethodName)

	def tearDown(self):
		self.__log("---- %s finish ----\n" % self._testMethodName)

	def test_macaddress(self):
		mac = utils.get_eth_macaddr()
		self.assertIsNotNone(mac)
		mac = mac.upper()
		self.__log("MACADDR: %s\n" % mac)
		self.assertTrue(mac.startswith("00:C0:EF"), "OUI is not '00:C0:EF'")

	def test_version(self):
		ver = utils.get_version()
		self.__log("VERSION: %s\n" % ver)
		self.assertIsNotNone(ver)


