Route names must match pgwui component names
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 27 Jun 2020 22:24:20 +0000 (17:24 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 27 Jun 2020 22:24:20 +0000 (17:24 -0500)
README.rst
src/pgwui_logout/__init__.py
tests/test___init__.py

index abd0cbc07cb2edb870c6422d50e58153766ee411..65f7321bfeff76420f650e87c0918455033d9afa 100644 (file)
@@ -55,10 +55,10 @@ URL Configuration
 -----------------
 
 The default URL for PGWUI_Logout looks like
-*https://www.example.com/logout*.  The route name is ``logout``.
+*https://www.example.com/logout*.
 
 See the PGWUI_Common documentation for how to configure a different
-route.
+URL.
 
 
 Complete Documentation
index 85ab56a1a77038dd82dcb0d098a983f54fdafa19..b97e73067d3e44c7001766884c532c914de5246e 100644 (file)
 '''Provide a way to configure PGWUI.
 '''
 
+PGWUI_COMPONENT = 'pgwui_logout'
 DEFAULT_LOGOUT_ROUTE = '/logout'
 
 
 def includeme(config):
     '''Pyramid configuration for PGWUI_Logout
     '''
-    config.add_route('logout', DEFAULT_LOGOUT_ROUTE)
+    config.add_route(PGWUI_COMPONENT, DEFAULT_LOGOUT_ROUTE)
     config.scan()
index 493f51b95d4c241aa0fdb78cf0a5408bbe014de4..66b9afb2399f2c5d31b06e329c964798f167ef27 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2018, 2019 The Meme Factory, Inc.  http://www.meme.com/
+# Copyright (C) 2018, 2019, 2020 The Meme Factory, Inc.
+# http://www.karlpinc.com/
 
 # This file is part of PGWUI_Logout.
 #
@@ -17,7 +18,7 @@
 # <http://www.gnu.org/licenses/>.
 #
 
-# Karl O. Pinc <kop@meme.com>
+# Karl O. Pinc <kop@karlpinc.com>
 
 import pyramid.config
 from pyramid.threadlocal import get_current_request
@@ -46,7 +47,7 @@ def test_includeme_functional(pyramid_request_config):
     pgwui_logout_init.includeme(pyramid_request_config)
     request = get_current_request()
 
-    logout_path = request.route_path('logout')
+    logout_path = request.route_path('pgwui_logout')
     assert logout_path == pgwui_logout_init.DEFAULT_LOGOUT_ROUTE