Update of /cvsroot/webware/Webware/MiddleKit/Tests/MKObjRef.mkmodel
In directory usw-pr-cvs1:/tmp/cvs-serv11738/Tests/MKObjRef.mkmodel
Modified Files:
TestEmpty1.py TestEmpty2.py TestSamples.py
Log Message:
- Remove ObjectStore.Store var which referred to the first store that happened to be created.
- Remove the store arg to MiddleObject.__init__(store) which was little used and confusing.
- Test suite clean ups.
- Make MKMultipleStores test having 2 different stores. This works now.
- Can now have two WebKit contexts that use MiddleKit without problems.
- Add MKMultipleStores to default set of test suites.
Index: TestEmpty1.py
===================================================================
RCS file: /cvsroot/webware/Webware/MiddleKit/Tests/MKObjRef.mkmodel/TestEmpty1.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestEmpty1.py 9 Dec 2001 15:21:24 -0000 1.1
--- TestEmpty1.py 3 May 2002 14:26:31 -0000 1.2
***************
*** 1,7 ****
! def test():
from Foo import Foo
from Bar import Bar
from BarReq import BarReq
- from MiddleKit.Run.ObjectStore import Store as store
# Create a Foo and a Bar that refers to it
--- 1,6 ----
! def test(store):
from Foo import Foo
from Bar import Bar
from BarReq import BarReq
# Create a Foo and a Bar that refers to it
Index: TestEmpty2.py
===================================================================
RCS file: /cvsroot/webware/Webware/MiddleKit/Tests/MKObjRef.mkmodel/TestEmpty2.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestEmpty2.py 9 Dec 2001 15:21:24 -0000 1.1
--- TestEmpty2.py 3 May 2002 14:26:31 -0000 1.2
***************
*** 1,3 ****
! def test():
'''
Bug report from Stefan Karlsson <stefan@...> on Dec 3 2001.
--- 1,3 ----
! def test(store):
'''
Bug report from Stefan Karlsson <stefan@...> on Dec 3 2001.
***************
*** 8,12 ****
from Foo import Foo
from BarReq import BarReq
- from MiddleKit.Run.ObjectStore import Store as store
# Since we're the second empty test, double check that the db is really empty
--- 8,11 ----
***************
*** 25,30 ****
assert len(bars)==1
bar2 = bars[0]
- print '>> bar._foo = %r' % bar._foo
- print '>> bar.foo() = %r' % bar.foo()
assert bar2 is bar
assert bar.foo() is not None # the sign of the bug in question
--- 24,27 ----
Index: TestSamples.py
===================================================================
RCS file: /cvsroot/webware/Webware/MiddleKit/Tests/MKObjRef.mkmodel/TestSamples.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestSamples.py 25 Mar 2002 13:02:53 -0000 1.3
--- TestSamples.py 3 May 2002 14:26:31 -0000 1.4
***************
*** 1,6 ****
! def test():
from Foo import Foo
from Bar import Bar
- from MiddleKit.Run.ObjectStore import Store as store
bar = store.fetchObjectsOfClass(Bar)[0]
--- 1,5 ----
! def test(store):
from Foo import Foo
from Bar import Bar
bar = store.fetchObjectsOfClass(Bar)[0]
|