Index: usernode.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/usernode/usernode.module,v
retrieving revision 1.12.2.22
diff -u -r1.12.2.22 usernode.module
--- usernode.module	26 Nov 2007 20:26:30 -0000	1.12.2.22
+++ usernode.module	12 Mar 2008 16:27:14 -0000
@@ -112,6 +112,13 @@
  * Implementation of hook_delete().
  */
 function usernode_delete(&$node) {
+  if (module_exists('simpletest') && strpos($node->title, 'simpletest_') === 0 && strpos($node->name, 'simpletest_') === 0) {
+    // Simpletest browser testing can create temporary users
+    // for testing specific pages with specific permissions.
+    // This allows Simpletest to delete the temporary user when
+    // the test is complete.
+    return;
+  }
   // prevent deletion of usernodes, if a module directly calls node_delete()
   drupal_set_message('You mustn\'t delete a usernode, so the deletion has been prevented! Delete the '.
                      'according user and the usernode is going to be deleted automatically.', 'error');
