]> Frank Brehm's Git Trees - pixelpark/puppet-tools.git/commitdiff
Extending tests in test/test_05_base_app.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 6 Feb 2023 09:55:33 +0000 (10:55 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 6 Feb 2023 09:55:33 +0000 (10:55 +0100)
test/test_05_base_app.py

index dc7cc08f86435f46a33c68529b98ecf2ed56eeda..3335a90046bd5f98eaf6d2386fd2eadad48d1439 100755 (executable)
@@ -39,6 +39,29 @@ class TestBaseApp(DpxPuppetToolsTestcase):
         LOG.debug(
             "Version of dpx_puppettools.app: " + dpx_puppettools.app.__version__)
 
+    # -------------------------------------------------------------------------
+    def test_init(self):
+
+        LOG.info("Testing init of a BaseDPXPuppetApplication object ...")
+        from dpx_puppettools.app import BaseDPXPuppetApplication
+
+        quiet = False
+        if not self.verbose:
+            quiet = True
+
+        app = BaseDPXPuppetApplication(
+            appname=self.appname, verbose=self.verbose)
+        app.quiet = quiet
+
+        LOG.debug("Drawing lines ...")
+        app.empty_line()
+        app.line(linechar='#', color='CYAN')
+        app.line(width=20)
+
+        LOG.debug("BaseDPXPuppetApplication %%r: %r", app)
+        app.empty_line()
+        LOG.debug("BaseDPXPuppetApplication %%s: %s", str(app))
+
 
 # =============================================================================
 if __name__ == '__main__':
@@ -53,6 +76,7 @@ if __name__ == '__main__':
     suite = unittest.TestSuite()
 
     suite.addTest(TestBaseApp('test_import', verbose))
+    suite.addTest(TestBaseApp('test_init', verbose))
 
     runner = unittest.TextTestRunner(verbosity=verbose)