BIND 10 trac2641_3, updated. 0abfd1c9e17568e36411cfc30e5e084fa84c92df [2641] Test that login_to_cmdctl() calls _have_users()
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Feb 19 06:05:19 UTC 2013
The branch, trac2641_3 has been updated
via 0abfd1c9e17568e36411cfc30e5e084fa84c92df (commit)
from 788685826e01b05cdb12c78bf367192d0139745c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0abfd1c9e17568e36411cfc30e5e084fa84c92df
Author: Mukund Sivaraman <muks at isc.org>
Date: Tue Feb 19 11:35:08 2013 +0530
[2641] Test that login_to_cmdctl() calls _have_users()
-----------------------------------------------------------------------
Summary of changes:
src/bin/bindctl/tests/bindctl_test.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/bin/bindctl/tests/bindctl_test.py b/src/bin/bindctl/tests/bindctl_test.py
index d1097a9..b28e640 100644
--- a/src/bin/bindctl/tests/bindctl_test.py
+++ b/src/bin/bindctl/tests/bindctl_test.py
@@ -628,6 +628,22 @@ class TestConfigCommands(unittest.TestCase):
finally:
self.tool.conn = orig_conn
+ def test_login_to_cmdctl_calls_have_users(self):
+ # Test that login_to_cmdctl() calls _have_users() and fails if
+ # _have_users() returns False.
+ orig_have_users = self.tool._have_users
+ try:
+ def my_have_users():
+ return False
+
+ self.tool._have_users = my_have_users
+ self.assertFalse(self.tool.login_to_cmdctl())
+ self.__check_printed_messages(
+ ['There are no existing users. Please configure '
+ 'a user account using b10-cmdctl-usermgr.'])
+ finally:
+ self.tool._have_users = orig_have_users
+
def test_run(self):
def login_to_cmdctl():
return True
More information about the bind10-changes
mailing list