debugging unit test

I've been debugging my unit test. And it was difficult to figure out if the unit test was broken or the code was broken. I got feedback on my code review, and I need to change all my python "tabs" in spaces, which I think I can do globally. I also had to fix the logic of the test, and because a test couldn't run although I wrote it correctly, the failure of the test showed a flaw in the main function. I'll need to rewrite the main function to parse urls with a different order of operations.