def test_remove_user(self):
     testuser = self.get_random_username()
     create_user(testuser, u'randompass', u'planlos-test1@localhost')
     remove_user(testuser)
     userdoc = self.db.users.find_one({'username': testuser})
     self.assertEqual(userdoc, None)
     groupdoc = self.db.groups.find_one({'name': testuser})
     self.assertEqual(groupdoc, None)
 def test_remove_user(self):
     testuser = self.get_random_username()
     create_user(testuser, u'randompass', u'planlos-test1@localhost')
     remove_user(testuser)
     userdoc = self.db.users.find_one({'username': testuser})
     self.assertEqual(userdoc, None)
     groupdoc = self.db.groups.find_one({'name': testuser})
     self.assertEqual(groupdoc, None)
 def test_remove_nonexistent_user(self):
     testuser = self.get_random_username()
     remove_user(testuser)
 def test_remove_nonexistent_user(self):
     testuser = self.get_random_username()
     remove_user(testuser)