Refactorized test. Added URL for forms and moved code in views and tests