Esempio n. 1
0
    def test_find_all_options(self):
        diff = Diff(self, Name('example.org.'))
        name = Name('www.example.org.')
        options = isc.datasrc.ZoneFinder.NO_WILDCARD

        self.assertFalse(self.__find_all_called)
        self.assertEqual(None, self.__find_all_name)
        self.assertEqual(None, self.__find_all_options)

        self.assertEqual("find_all_return", diff.find_all(name, options))

        self.assertTrue(self.__find_all_called)
        self.assertEqual(name, self.__find_all_name)
        self.assertEqual(options, self.__find_all_options)
Esempio n. 2
0
    def test_find_all(self):
        diff = Diff(self, Name('example.org.'))
        name = Name('www.example.org.')

        self.assertFalse(self.__find_all_called)
        self.assertEqual(None, self.__find_all_name)
        self.assertEqual(None, self.__find_all_options)

        self.assertEqual("find_all_return", diff.find_all(name))

        self.assertTrue(self.__find_all_called)
        self.assertEqual(name, self.__find_all_name)
        self.assertEqual(ZoneFinder.NO_WILDCARD | ZoneFinder.FIND_GLUE_OK,
                         self.__find_all_options)