diff test/db_test_base.py @ 3554:5e70726a86dd

fixed schema migration problem when Class keys were removed fixed lookup of config in all-hell's-broken-loose cgi.Client error handler fixed metakit use of is_stopword
author Richard Jones <richard@users.sourceforge.net>
date Thu, 09 Feb 2006 23:53:11 +0000
parents 7728ee93efd2
children f47bddab5a49
line wrap: on
line diff
--- a/test/db_test_base.py	Thu Feb 09 04:46:22 2006 +0000
+++ b/test/db_test_base.py	Thu Feb 09 23:53:11 2006 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# $Id: db_test_base.py,v 1.66 2006-02-07 04:59:05 richard Exp $
+# $Id: db_test_base.py,v 1.67 2006-02-09 23:53:11 richard Exp $
 
 import unittest, os, shutil, errno, imp, sys, time, pprint, sets
 
@@ -1355,6 +1355,20 @@
         # confirm journal's ok
         self.db.getjournal('a', aid)
 
+    def test_removeClassKey(self):
+        self.init_amod()
+        aid = self.db.a.create(name='apple')
+        self.assertEqual(self.db.a.lookup('apple'), aid)
+        self.db.commit(); self.db.close()
+
+        self.db = self.module.Database(config, 'admin')
+        a = self.module.Class(self.db, "a", name=String(), newstr=String())
+        self.db.post_init()
+
+        aid2 = self.db.a.create(name='apple', newstr='booz')
+        self.db.commit()
+
+
     def init_amodml(self):
         self.db = self.module.Database(config, 'admin')
         a = self.module.Class(self.db, "a", name=String(),

Roundup Issue Tracker: http://roundup-tracker.org/