replace hashcompat with hashlib in tests and fix form template url