Add missing part in previous commit
New test code in register.py