unit tests for agent.py

fixes #31 

has unit tests for all functions except for the parts that require a LENS call