Test to ensure that this pgwui component is autoconfigured
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 28 Dec 2019 21:37:22 +0000 (15:37 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 28 Dec 2019 21:37:22 +0000 (15:37 -0600)
setup.py
tests/test___init__.py

index 8209db4a5a23da2cd937d19fc52240b8d5b43f9b..08f14bc83486373a41224349c166980c8d225455 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -165,9 +165,7 @@ setup(
     # To provide executable scripts, use entry points in preference to the
     # "scripts" keyword. Entry points provide cross-platform support and allow
     # pip to create the appropriate form of executable for the target platform.
-    # entry_points={
-    #     'console_scripts': [
-    #         'sample=sample:main',
-    #     ],
-    # },
+    #
+    # Setup an entry point to support PGWUI autoconfigure discovery.
+    entry_points={'pgwui.components': '.pgwui_logout = pgwui_logout'}
 )
index a7af24bf9089e67153284e08c0bf45ae1f157a3c..493f51b95d4c241aa0fdb78cf0a5408bbe014de4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 The Meme Factory, Inc.  http://www.meme.com/
+# Copyright (C) 2018, 2019 The Meme Factory, Inc.  http://www.meme.com/
 
 # This file is part of PGWUI_Logout.
 #
@@ -28,6 +28,14 @@ import pgwui_logout.__init__ as pgwui_logout_init
 pytest_plugins = ("pgwui",)
 
 
+# Module packaging test
+
+def test_pgwui_upload_is_pgwui_component(pgwui_component_entry_point):
+    '''Ensure that pgwui_upload is a pgwui.component entry point
+    '''
+    assert pgwui_component_entry_point('pgwui_logout') is True
+
+
 # Functional tests
 
 # includeme()