This is a simple encoding method and associated tests.
Run the test scripts from the command line or use nosy. If using nosy, then comment out the following lines:
if __name__ == '__main__':
unittest2.main()
required modules: mock, StringIO, unittest2, and urllib2