added tests to urltools and converted server.py to use them