[Zodb-checkins] CVS: Packages/bsddb3Storage - test_virgin.py:1.5
barry@digicool.com
barry@digicool.com
Mon, 2 Apr 2001 19:10:06 -0400 (EDT)
Update of /cvs-repository/Packages/bsddb3Storage/test
In directory korak:/tmp/cvs-serv28212
Modified Files:
test_virgin.py
Log Message:
Factor out commonality between the Minimal and Full tests.
--- Updated File test_virgin.py in package Packages/bsddb3Storage --
--- test_virgin.py 2001/04/02 22:36:45 1.4
+++ test_virgin.py 2001/04/02 23:10:05 1.5
@@ -5,13 +5,11 @@
-class FullNewInsertsTest(test_create.FullBaseFramework):
+class BaseInsertMixin:
def checkIsEmpty(self):
- """Full: Newly created database should be empty"""
assert not self._root.has_key('names')
def checkNewInserts(self):
- """Full: Commiting on a newly created database"""
from Persistence import PersistentMapping
self._root['names'] = names = PersistentMapping()
@@ -21,19 +19,12 @@
-class MinimalNewInsertsTest(test_create.MinimalBaseFramework):
- def checkIsEmpty(self):
- """Minimal: Newly created database is empty"""
- assert not self._root.has_key('names')
+class FullNewInsertsTest(test_create.FullBaseFramework, BaseInsertMixin):
+ pass
- def checkNewInserts(self):
- """Minimal: Committing on a newly created database"""
- from Persistence import PersistentMapping
- self._root['names'] = names = PersistentMapping()
- names['Warsaw'] = 'Barry'
- names['Hylton'] = 'Jeremy'
- get_transaction().commit()
+class MinimalNewInsertsTest(test_create.MinimalBaseFramework, BaseInsertMixin):
+ pass