From: wc2so1 Date: Tue, 27 Jan 2004 18:16:50 +0000 (+0000) Subject: added testPasswordUnset X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c66a45f766ee98705ac6763a0eb4777a048cdd5;p=roundup.git added testPasswordUnset as metakit doesn't handle null values. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2064 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/test/test_metakit.py b/test/test_metakit.py index 8596154..0610b79 100644 --- a/test/test_metakit.py +++ b/test/test_metakit.py @@ -15,11 +15,10 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_metakit.py,v 1.2 2003-11-14 00:11:19 richard Exp $ - +# $Id: test_metakit.py,v 1.3 2004-01-27 18:16:50 wc2so1 Exp $ import unittest, os, shutil, time, weakref -from db_test_base import DBTest, ROTest, SchemaTest, ClassicInitTest, config +from db_test_base import DBTest, ROTest, SchemaTest, ClassicInitTest, config, password from roundup import backends @@ -75,6 +74,13 @@ class metakitDBTest(metakitOpener, DBTest): self.db.user.set(nid, age=None) self.assertEqual(self.db.user.get(nid, "age"), 0) + def testPasswordUnset(self): + # XXX: metakit can't unset Numbers (id's) :( + x = password.Password('x') + nid = self.db.user.create(username='foo', password=x) + self.db.user.set(nid, assignable=None) + self.assertEqual(self.db.user.get(nid, "assignable"), 0) + class metakitROTest(metakitOpener, ROTest): pass