'Clearing log levels.'

def test_clearLogLevels(self):

    predicate = LogLevelFilterPredicate()
    predicate.setLogLevelForNamespace('twext.web2', LogLevel.debug)
    predicate.setLogLevelForNamespace('twext.web2.dav', LogLevel.error)
    predicate.clearLogLevels()
    self.assertEqual(predicate.logLevelForNamespace('twisted'), predicate.defaultLogLevel)
    self.assertEqual(predicate.logLevelForNamespace('twext.web2'), predicate.defaultLogLevel)
    self.assertEqual(predicate.logLevelForNamespace('twext.web2.dav'), predicate.defaultLogLevel)
    self.assertEqual(predicate.logLevelForNamespace('twext.web2.dav.test'), predicate.defaultLogLevel)
    self.assertEqual(predicate.logLevelForNamespace('twext.web2.dav.test1.test2'), predicate.defaultLogLevel)
