def test_getPluginDirs(self): """ L{util.getPluginDirs} is deprecated. """ util.getPluginDirs() warnings = self.flushWarnings(offendingFunctions=[self.test_getPluginDirs]) self.assertEqual( warnings[0]["message"], "twisted.python.util.getPluginDirs is deprecated since Twisted " "12.2." ) self.assertEqual(warnings[0]["category"], DeprecationWarning) self.assertEqual(len(warnings), 1)
def test_getPluginDirs(self): """ L{util.getPluginDirs} is deprecated. """ util.getPluginDirs() warnings = self.flushWarnings( offendingFunctions=[self.test_getPluginDirs]) self.assertEqual( warnings[0]['message'], "twisted.python.util.getPluginDirs is deprecated since Twisted " "12.2.") self.assertEqual(warnings[0]['category'], DeprecationWarning) self.assertEqual(len(warnings), 1)