def testPasswdEmptySourceGetUpdates(self): """Test that getUpdates on the PasswdUpdateGetter works.""" getter = ldapsource.PasswdUpdateGetter({}) data = getter.GetUpdates(self.source, 'TEST_BASE', 'TEST_FILTER', 'base', None) self.failUnlessEqual(passwd.PasswdMap, type(data))
def testBadScopeException(self): """Test that a bad scope raises a config.ConfigurationError.""" # One of the getters is sufficient, they all inherit the # exception-raising code. getter = ldapsource.PasswdUpdateGetter({}) self.assertRaises(error.ConfigurationError, getter.GetUpdates, self.source, 'TEST_BASE', 'TEST_FILTER', 'BAD_SCOPE', None)