You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2014/02/27 02:14:18 UTC
svn commit: r1572372 - in
/bloodhound/trunk/bloodhound_multiproduct/tests/admin: console-tests.txt
console.py
Author: rjollos
Date: Thu Feb 27 01:14:18 2014
New Revision: 1572372
URL: http://svn.apache.org/r1572372
Log:
0.8dev: Added tests for help command at product scope. Refs #757.
Modified:
bloodhound/trunk/bloodhound_multiproduct/tests/admin/console-tests.txt
bloodhound/trunk/bloodhound_multiproduct/tests/admin/console.py
Modified: bloodhound/trunk/bloodhound_multiproduct/tests/admin/console-tests.txt
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/tests/admin/console-tests.txt?rev=1572372&r1=1572371&r2=1572372&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/tests/admin/console-tests.txt (original)
+++ bloodhound/trunk/bloodhound_multiproduct/tests/admin/console-tests.txt Thu Feb 27 01:14:18 2014
@@ -1022,3 +1022,108 @@ name17 0 2010-01-18 val17 val17
name18 0 2010-01-19 val18 val18
name19 0 2010-01-20 val19 val19
+===== test_product_help_ok =====
+trac-admin - The Trac Administration Console 1.0.1
+help Show documentation
+initenv Create and initialize a new environment
+attachment add Attach a file to a resource
+attachment export Export an attachment from a resource to a file or stdout
+attachment list List attachments of a resource
+attachment remove Remove an attachment from a resource
+changeset added Notify trac about changesets added to a repository
+changeset modified Notify trac about changesets modified in a repository
+component add Add a new component
+component chown Change component ownership
+component list Show available components
+component remove Remove/uninstall a component
+component rename Rename a component
+config get Get the value of the given option in "trac.ini"
+config remove Remove the specified option from "trac.ini"
+config set Set the value for the given option in "trac.ini"
+deploy Extract static resources from Trac and all plugins
+hotcopy Make a hot backup copy of an environment
+milestone add Add milestone
+milestone completed Set milestone complete date
+milestone due Set milestone due date
+milestone list Show milestones
+milestone remove Remove milestone
+milestone rename Rename milestone
+permission add Add a new permission rule
+permission export Export permission rules to a file or stdout as CSV
+permission import Import permission rules from a file or stdin as CSV
+permission list List permission rules
+permission remove Remove a permission rule
+priority add Add a priority value option
+priority change Change a priority value
+priority list Show possible ticket priorities
+priority order Move a priority value up or down in the list
+priority remove Remove a priority value
+repository add Add a source repository
+repository alias Create an alias for a repository
+repository list List source repositories
+repository remove Remove a source repository
+repository resync Re-synchronize trac with repositories
+repository set Set an attribute of a repository
+repository sync Resume synchronization of repositories
+resolution add Add a resolution value option
+resolution change Change a resolution value
+resolution list Show possible ticket resolutions
+resolution order Move a resolution value up or down in the list
+resolution remove Remove a resolution value
+session add Create a session for the given sid
+session delete Delete the session of the specified sid
+session list List the name and email for the given sids
+session purge Purge all anonymous sessions older than the given age
+session set Set the name or email attribute of the given sid
+severity add Add a severity value option
+severity change Change a severity value
+severity list Show possible ticket severities
+severity order Move a severity value up or down in the list
+severity remove Remove a severity value
+ticket remove Remove ticket
+ticket_type add Add a ticket type
+ticket_type change Change a ticket type
+ticket_type list Show possible ticket types
+ticket_type order Move a ticket type up or down in the list
+ticket_type remove Remove a ticket type
+upgrade Upgrade database to current version
+version add Add version
+version list Show versions
+version remove Remove version
+version rename Rename version
+version time Set version date
+wiki dump Export wiki pages to files named by title
+wiki export Export wiki page to file or stdout
+wiki import Import wiki page from file or stdin
+wiki list List wiki pages
+wiki load Import wiki pages from files
+wiki remove Remove wiki page
+wiki rename Rename wiki page
+wiki replace Replace the content of wiki pages from files (DANGEROUS!)
+wiki upgrade Upgrade default wiki pages to current version
+===== test_product_help_version =====
+version add <name> [time]
+
+ Add version
+
+version list
+
+ Show versions
+
+version remove <name>
+
+ Remove version
+
+version rename <name> <newname>
+
+ Rename version
+
+version time <name> <time>
+
+ Set version date
+
+===== test_product_help_version_add =====
+version add <name> [time]
+
+ Add version
+
Modified: bloodhound/trunk/bloodhound_multiproduct/tests/admin/console.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/tests/admin/console.py?rev=1572372&r1=1572371&r2=1572372&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/tests/admin/console.py (original)
+++ bloodhound/trunk/bloodhound_multiproduct/tests/admin/console.py Thu Feb 27 01:14:18 2014
@@ -61,6 +61,29 @@ class ProductTracAdminTestCase(Tracadmin
self.global_env.reset_db()
self.global_env = self._env = None
+ def test_product_help_ok(self):
+ self._admin.env_set('', self.global_env)
+ from trac import __version__
+ test_name = sys._getframe().f_code.co_name
+ expected_results = self.expected_results[test_name] \
+ % {'version': __version__}
+ rv, output = self._execute('product admin %s help'
+ % self.default_product)
+ self.assertEqual(0, rv)
+ self.assertEqual(expected_results, output)
+
+ def test_product_help_version(self):
+ rv, output = self._execute('help version')
+ self.assertEqual(0, rv)
+ expected = self.expected_results[self._testMethodName]
+ self.assertEqual(expected, output)
+
+ def test_product_help_version_add(self):
+ rv, output = self._execute('help version add')
+ self.assertEqual(0, rv)
+ expected = self.expected_results[self._testMethodName]
+ self.assertEqual(expected, output)
+
def test_suite():
return unittest.TestSuite([