replaced hardcoded url with reverse routes in functional tests
test refactoring