Browse Source

[2281] Add comments on use of static datasrc instead of memory datasrc in tests

Mukund Sivaraman 12 years ago
parent
commit
67940bdbff

+ 7 - 1
src/lib/python/isc/datasrc/tests/datasrc_test.py

@@ -563,7 +563,10 @@ class DataSrcUpdater(unittest.TestCase):
         self.assertEqual(updater_refs, sys.getrefcount(updater))
 
     def test_two_modules(self):
-        # load two modules, and check if they don't interfere
+        # load two modules, and check if they don't interfere; as the
+        # memory datasource module no longer exists, we check the static
+        # datasource instead (as that uses the memory datasource
+        # anyway).
         dsc_static = isc.datasrc.DataSourceClient("static", STATIC_ZONE_CONFIG)
         dsc_sql = isc.datasrc.DataSourceClient("sqlite3", READ_ZONE_DB_CONFIG)
 
@@ -721,6 +724,9 @@ class DataSrcUpdater(unittest.TestCase):
         self.assertTrue(dsc.delete_zone(zone_name))
 
     def test_create_zone_not_implemented(self):
+        # As the memory datasource module no longer exists, we check the
+        # static datasource instead (as that uses the memory datasource
+        # anyway).
         dsc = isc.datasrc.DataSourceClient("static", STATIC_ZONE_CONFIG)
         self.assertRaises(isc.datasrc.NotImplemented, dsc.create_zone,
                           isc.dns.Name("example.com"))

+ 7 - 2
src/lib/python/isc/datasrc/tests/zone_loader_test.py

@@ -216,8 +216,13 @@ class ZoneLoaderTests(unittest.TestCase):
                           self.client, zone_name, self.source_client)
 
     def test_no_ds_load_support(self):
-        # This may change in the future, but atm, the static ds does
-        # not support the API the zone loader uses (it has direct load calls)
+        # As the memory datasource module no longer exists, we check the
+        # static datasource instead (as that uses the memory datasource
+        # anyway).
+        #
+        # This may change in the future, but ATM, the static ds does not
+        # support the API the zone loader uses (it has direct load
+        # calls).
         inmem_client = isc.datasrc.DataSourceClient('static',
                                                     STATIC_ZONE_CONFIG);
         self.assertRaises(isc.datasrc.NotImplemented,