fix cases for running as a test and running as a webserver
add pytest conf file