Commit d22a225b authored by ritwik's avatar ritwik Committed by Abhilash Raj

mailman shell banner should mention about commit()

parent 2ef53d15
......@@ -27,6 +27,9 @@ You can list all the key-value pairs of a specific section.
>>> command('mailman conf --section shell')
[shell] banner: Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
[shell] history_file:
[shell] prompt: >>>
[shell] use_ipython: no
......
......@@ -80,7 +80,10 @@ class TestShell(unittest.TestCase):
self._command.invoke(shell, ('--interactive',))
posargs, kws = mock.InteractiveShellEmbed.instance().mainloop.call_args
self.assertEqual(
kws['display_banner'], 'Welcome to the GNU Mailman shell\n')
kws['display_banner'], """Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.\n""")
@configuration('shell', use_ipython='yes')
def test_start_ipython1(self):
......@@ -89,7 +92,10 @@ class TestShell(unittest.TestCase):
self._command.invoke(shell, ('--interactive',))
posargs, kws = mock.InteractiveShellEmbed.instance.call_args
self.assertEqual(
kws['banner1'], 'Welcome to the GNU Mailman shell\n')
kws['banner1'], """Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.\n""")
@configuration('shell', use_ipython='debug')
def test_start_ipython_debug(self):
......@@ -98,7 +104,10 @@ class TestShell(unittest.TestCase):
self._command.invoke(shell, ('--interactive',))
posargs, kws = mock.InteractiveShellEmbed.instance().mainloop.call_args
self.assertEqual(
kws['display_banner'], 'Welcome to the GNU Mailman shell\n')
kws['display_banner'], """Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.\n""")
@configuration('shell', use_ipython='oops')
def test_start_ipython_invalid(self):
......
......@@ -130,7 +130,10 @@ component_package:
prompt: >>>
# Banner to show on startup.
banner: Welcome to the GNU Mailman shell
banner: Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
# Use IPython as the shell, which must be found on the system. Valid values
# are `no`, `yes`, and `debug` where the latter is equivalent to `yes` except
......
......@@ -178,6 +178,9 @@ do::
$ mailman shell
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
>>> list_manager = getUtility(IListManager)
......
......@@ -106,6 +106,9 @@ do::
$ mailman shell
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
>>> list_manager = getUtility(IListManager)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment