'''Provide a way to configure PGWUI.
'''
+DEFAULT_LOGOUT_ROUTE = '/logout'
+
def includeme(config):
'''Pyramid configuration for PGWUI_Logout
'''
- config.add_route('logout', '/logout')
+ config.add_route('logout', DEFAULT_LOGOUT_ROUTE)
config.scan()
--- /dev/null
+# Copyright (C) 2018 The Meme Factory, Inc. http://www.meme.com/
+
+# This file is part of PGWUI_Logout.
+#
+# This program is free software: you can redistribute it and/or
+# modify it under the terms of the GNU Affero General Public License
+# as published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+
+# Karl O. Pinc <kop@meme.com>
+
+import pyramid.config
+from pyramid.threadlocal import get_current_request
+import pgwui_logout.__init__ as pgwui_logout_init
+
+
+# Activiate our pytest plugin
+pytest_plugins = ("pgwui",)
+
+
+# Functional tests
+
+# includeme()
+
+def test_includeme_functional(pyramid_request_config):
+ '''Sets a route for 'logout'
+ '''
+ pgwui_logout_init.includeme(pyramid_request_config)
+ request = get_current_request()
+
+ logout_path = request.route_path('logout')
+ assert logout_path == pgwui_logout_init.DEFAULT_LOGOUT_ROUTE
+
+
+# Integration tests
+
+def test_includeme_integration():
+ '''Does not blow up
+ '''
+ config = pyramid.config.Configurator()
+ pgwui_logout_init.includeme(config)