update tests and python template to pass