KCC: add a very puny stub for kcc.kcc_utils tests
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 4 May 2015 23:26:42 +0000 (11:26 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 12 Jun 2015 04:57:15 +0000 (06:57 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/kcc/kcc_utils.py [new file with mode: 0644]
selftest/tests.py

diff --git a/python/samba/tests/kcc/kcc_utils.py b/python/samba/tests/kcc/kcc_utils.py
new file mode 100644 (file)
index 0000000..ac59bee
--- /dev/null
@@ -0,0 +1,37 @@
+# Unix SMB/CIFS implementation. Tests for samba.kcc.kcc_utils.
+# Copyright (C) Andrew Bartlett 2015
+#
+# Written by Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+"""Tests for samba.kcc.kcc_utils"""
+import samba
+import samba.tests
+from samba.kcc.kcc_utils import *
+
+
+class ScheduleTests(samba.tests.TestCase):
+
+    def test_new_connection_schedule(self):
+        schedule = new_connection_schedule()
+        self.assertIsInstance(schedule, drsblobs.schedule)
+        self.assertEquals(schedule.size, 188)
+        self.assertEquals(len(schedule.dataArray[0].slots), 168)
+
+
+# OK, this is pathetic, but the rest of it looks really hard, with the
+# classes all intertwingled with each other and the samdb. That is to say:
+# XXX later.
index 7cca4de1eaaa0367d51ad7da89d0d78e1515a1c3..723909479495026a92d5d0a3d99703c96321ccf5 100644 (file)
@@ -97,5 +97,6 @@ planpythontestsuite("none", "samba.tests.xattr")
 planpythontestsuite("none", "samba.tests.ntacls")
 planpythontestsuite("none", "samba.tests.policy")
 planpythontestsuite("none", "samba.tests.kcc.graph_utils")
+planpythontestsuite("none", "samba.tests.kcc.kcc_utils")
 planpythontestsuite("none", "samba.tests.kcc.ldif_import_export")
 plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")])