Index: tests/mollom.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/tests/mollom.test,v
retrieving revision 1.61
diff -u -p -r1.61 mollom.test
--- tests/mollom.test	20 Sep 2010 03:39:10 -0000	1.61
+++ tests/mollom.test	21 Sep 2010 16:44:54 -0000
@@ -153,6 +153,8 @@ class MollomWebTestCase extends DrupalWe
       ->fields('w')
       ->condition('w.type', 'mollom')
       ->orderBy('w.timestamp', 'ASC');
+
+    $had_severe_message = FALSE;
     foreach ($query->execute() as $row) {
       // In case no fail is expected, only log messages with a severity of
       // WATCHDOG_NOTICE or less severe messages must pass. More severe messages
@@ -162,15 +164,21 @@ class MollomWebTestCase extends DrupalWe
       // WATCHDOG_EMERGENCY is 0, WATCHDOG_NOTICE is 5, WATCHDOG_DEBUG is 7.
       // In case a fail is expected, all messages always pass, since we would
       // otherwise trigger a false positive test failure if there are additional
-      // non-severe log messages.
+      // non-severe log messages. However, in order to actually assert the
+      // expectation, there must have been at least one severe log message.
       if (!$no_fail_expected || $row->severity >= WATCHDOG_NOTICE) {
         $this->pass(theme_dblog_message(array('event' => $row, 'link' => FALSE)), t('Watchdog'));
+        $had_severe_message = ($had_severe_message || $row->severity < WATCHDOG_NOTICE);
       }
       else {
         $this->fail(theme_dblog_message(array('event' => $row, 'link' => FALSE)), t('Watchdog'));
       }
       $this->messages[$row->wid] = $row;
     }
+    // In case we expected a severe message, there must have been one.
+    if (!$no_fail_expected && !$had_severe_message) {
+      $this->fail(t('Severe log message not found.'), t('Watchdog'));
+    }
     // Delete processed watchdog messages.
     if (!empty($this->messages)) {
       $seen_ids = array_keys($this->messages);
