Add test framework 

refer to http://docs.python.org/2/library/unittest.html for writing examples.