Fix doc unittests for module and template declarations