cdb.add(b'this is the value of the qname tag', b'this is the value of the second tag')
cdb.commit().close()
os.rename(fname+'.tmp', fname)
+ cdb.close()
@unittest.skipIf('SKIP_CDB_TESTS' in os.environ, 'CDB tests are disabled')
class CDBTest(DNSDistTest):
self.assertEqual(expectedResponse, receivedResponse)
# write a new CDB which has no entry for 127.0.0.1
+ # first ensure that the mtime will change after writing
+ # the new version
+ time.sleep(1)
writeCDB(self._cdbFileName, 2)
# wait long enough for the CDB database to be reloaded
time.sleep(self._cdbRefreshDelay + 1)