BIND 10 trac1976, updated. af4e7787d37b951f9a48e992f0e2c6f4e4a28c22 [1976] Add missing test file

BIND 10 source code commits bind10-changes at lists.isc.org
Sat Jun 30 18:21:37 UTC 2012


The branch, trac1976 has been updated
       via  af4e7787d37b951f9a48e992f0e2c6f4e4a28c22 (commit)
      from  27b68b4cbeb6ed397baf40221b9dda915230dcf6 (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 af4e7787d37b951f9a48e992f0e2c6f4e4a28c22
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Sat Jun 30 19:45:59 2012 +0200

    [1976] Add missing test file
    
    The file was written previously and not committed to git. Fixing.

-----------------------------------------------------------------------

Summary of changes:
 .../cfgmgr/plugins/tests/datasrc_test.py}          |   28 ++++++++++++--------
 1 file changed, 17 insertions(+), 11 deletions(-)
 copy src/{lib/dns/python/tests/tsig_rdata_python_test.py => bin/cfgmgr/plugins/tests/datasrc_test.py} (62%)

-----------------------------------------------------------------------
diff --git a/src/bin/cfgmgr/plugins/tests/datasrc_test.py b/src/bin/cfgmgr/plugins/tests/datasrc_test.py
new file mode 100644
index 0000000..6047c44
--- /dev/null
+++ b/src/bin/cfgmgr/plugins/tests/datasrc_test.py
@@ -0,0 +1,36 @@
+# Copyright (C) 2011  Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# Make sure we can load the module, put it into path
+import sys
+import os
+sys.path.extend(os.environ["B10_TEST_PLUGIN_DIR"].split(':'))
+
+import datasrc
+import unittest
+
+class DatasrcTest(unittest.TestCase):
+    def test_load(self):
+        """
+        Checks the entry point returns the correct values.
+        """
+        (spec, check) = datasrc.load()
+        # It returns the checking function
+        self.assertEqual(check, datasrc.check)
+        # The plugin stores it's spec
+        self.assertEqual(spec, datasrc.spec)
+
+if __name__ == '__main__':
+        unittest.main()



More information about the bind10-changes mailing list