samba-tool: Add test to make sure all commands have a short description set.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 13 Oct 2011 21:49:05 +0000 (23:49 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 13 Oct 2011 23:53:45 +0000 (01:53 +0200)
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Oct 14 01:53:45 CEST 2011 on sn-devel-104

source4/scripting/python/samba/tests/netcmd.py

index 3f6448ac28db0ca5a8c0a396f3b939cc7fb319fa..d7c6482a460703781deddf9430851712c82ac7a0 100644 (file)
@@ -81,3 +81,14 @@ class CommandTests(NetCmdTestCase):
         if missing:
             self.fail("The following commands do not have a synopsis set: %r" %
                     missing)
+
+    def test_short_description_everywhere(self):
+        missing = []
+        for path, cmd in self.iter_all_subcommands():
+            if cmd.short_description is None:
+                missing.append(path)
+        if not missing:
+            return
+        self.fail(
+            "The following commands do not have a short description set: %r" %
+                missing)