Commit 206bd882 authored by Hanno Schlichting's avatar Hanno Schlichting

Updated the remaining test assertions

parent 6220f215
...@@ -15,8 +15,8 @@ Bugs Fixed ...@@ -15,8 +15,8 @@ Bugs Fixed
Features Added Features Added
++++++++++++++ ++++++++++++++
- Replaced failUnless with assertTrue and failIf with assertFalse in tests. - Updated test assertions to use unittest's ``assert*`` methods in favor of
their deprecated `fail*` aliases.
2.13.0a3 (2010-08-04) 2.13.0a3 (2010-08-04)
--------------------- ---------------------
......
...@@ -195,10 +195,10 @@ class FileTests(unittest.TestCase): ...@@ -195,10 +195,10 @@ class FileTests(unittest.TestCase):
# From a file # From a file
s = "a" * (1 << 16) * 3 s = "a" * (1 << 16) * 3
data, size = self.file._read_data(StringIO(s)) data, size = self.file._read_data(StringIO(s))
self.failIfEqual(data.next, None) self.assertNotEqual(data.next, None)
# From a string # From a string
data, size = self.file._read_data(s) data, size = self.file._read_data(s)
self.failIfEqual(data.next, None) self.assertNotEqual(data.next, None)
def testManageEditWithFileData(self): def testManageEditWithFileData(self):
self.file.manage_edit('foobar', 'text/plain', filedata='ASD') self.file.manage_edit('foobar', 'text/plain', filedata='ASD')
......
...@@ -54,10 +54,10 @@ class TestOrderSupport(unittest.TestCase): ...@@ -54,10 +54,10 @@ class TestOrderSupport(unittest.TestCase):
f = self._makeOne() f = self._makeOne()
method = getattr(f, methodname) method = getattr(f, methodname)
if rval == 'ValueError': if rval == 'ValueError':
self.failUnlessRaises( ValueError, method, *args ) self.assertRaises( ValueError, method, *args )
else: else:
self.failUnlessEqual( method(*args), rval ) self.assertEqual( method(*args), rval )
self.failUnlessEqual( f.objectIds(), order ) self.assertEqual( f.objectIds(), order )
def test_moveObjectsUp(self): def test_moveObjectsUp(self):
self._doCanonTest( 'moveObjectsUp', self._doCanonTest( 'moveObjectsUp',
...@@ -157,13 +157,13 @@ class TestOrderSupport(unittest.TestCase): ...@@ -157,13 +157,13 @@ class TestOrderSupport(unittest.TestCase):
f.o2.isPrincipiaFolderish = True f.o2.isPrincipiaFolderish = True
f.o3.isPrincipiaFolderish = True f.o3.isPrincipiaFolderish = True
f.o4.isPrincipiaFolderish = True f.o4.isPrincipiaFolderish = True
self.failUnlessEqual( f.tpValues(), [f.o2, f.o3, f.o4] ) self.assertEqual( f.tpValues(), [f.o2, f.o3, f.o4] )
f.setDefaultSorting('meta_type', False) f.setDefaultSorting('meta_type', False)
self.failUnlessEqual( f.tpValues(), [f.o3, f.o2, f.o4] ) self.assertEqual( f.tpValues(), [f.o3, f.o2, f.o4] )
f.setDefaultSorting('position', True) f.setDefaultSorting('position', True)
self.failUnlessEqual( f.tpValues(), [f.o4, f.o3, f.o2] ) self.assertEqual( f.tpValues(), [f.o4, f.o3, f.o2] )
def test_suite(): def test_suite():
......
...@@ -248,12 +248,12 @@ class TestTraverse( unittest.TestCase ): ...@@ -248,12 +248,12 @@ class TestTraverse( unittest.TestCase ):
self.assertTrue(self.folder1.unrestrictedTraverse( '/folder1/')) self.assertTrue(self.folder1.unrestrictedTraverse( '/folder1/'))
def testTraverseToNone( self ): def testTraverseToNone( self ):
self.failUnlessRaises( self.assertRaises(
KeyError, KeyError,
self.folder1.unrestrictedTraverse, ('', 'folder1', 'file2' ) ) self.folder1.unrestrictedTraverse, ('', 'folder1', 'file2' ) )
self.failUnlessRaises( self.assertRaises(
KeyError, self.folder1.unrestrictedTraverse, '/folder1/file2' ) KeyError, self.folder1.unrestrictedTraverse, '/folder1/file2' )
self.failUnlessRaises( self.assertRaises(
KeyError, self.folder1.unrestrictedTraverse, '/folder1/file2/' ) KeyError, self.folder1.unrestrictedTraverse, '/folder1/file2/' )
def testTraverseMethodRestricted(self): def testTraverseMethodRestricted(self):
...@@ -272,7 +272,7 @@ class TestTraverse( unittest.TestCase ): ...@@ -272,7 +272,7 @@ class TestTraverse( unittest.TestCase ):
# Zope security policy. # Zope security policy.
self._setupSecurity() self._setupSecurity()
bb = self._makeBoboTraversable() bb = self._makeBoboTraversable()
self.failUnlessRaises(KeyError, bb.restrictedTraverse, 'notfound') self.assertRaises(KeyError, bb.restrictedTraverse, 'notfound')
bb.restrictedTraverse('bb_subitem') bb.restrictedTraverse('bb_subitem')
def testBoboTraverseToMethod(self): def testBoboTraverseToMethod(self):
...@@ -323,7 +323,7 @@ class TestTraverse( unittest.TestCase ): ...@@ -323,7 +323,7 @@ class TestTraverse( unittest.TestCase ):
folder.manage_permission(access_contents_information, [], 0) folder.manage_permission(access_contents_information, [], 0)
bb = self._makeBoboTraversableWithAcquisition() bb = self._makeBoboTraversableWithAcquisition()
bb = bb.__of__(self.root) bb = bb.__of__(self.root)
self.failUnlessRaises(Unauthorized, self.assertRaises(Unauthorized,
bb.restrictedTraverse, 'folder1') bb.restrictedTraverse, 'folder1')
def testBoboTraverseToAcquiredAttribute(self): def testBoboTraverseToAcquiredAttribute(self):
...@@ -349,7 +349,7 @@ class TestTraverse( unittest.TestCase ): ...@@ -349,7 +349,7 @@ class TestTraverse( unittest.TestCase ):
folder.stuff = 'stuff here' folder.stuff = 'stuff here'
bb = self._makeBoboTraversableWithAcquisition() bb = self._makeBoboTraversableWithAcquisition()
bb = bb.__of__(folder) bb = bb.__of__(folder)
self.failUnlessRaises(Unauthorized, self.assertRaises(Unauthorized,
self.root.folder1.restrictedTraverse, 'stuff') self.root.folder1.restrictedTraverse, 'stuff')
def testBoboTraverseTraversalDefault(self): def testBoboTraverseTraversalDefault(self):
...@@ -389,7 +389,7 @@ class TestTraverse( unittest.TestCase ): ...@@ -389,7 +389,7 @@ class TestTraverse( unittest.TestCase ):
self._setupSecurity(CruelSecurityPolicy()) self._setupSecurity(CruelSecurityPolicy())
newSecurityManager( None, self._makeUser().__of__( self.root ) ) newSecurityManager( None, self._makeUser().__of__( self.root ) )
self.root.stuff = 'stuff here' self.root.stuff = 'stuff here'
self.failUnlessRaises(Unauthorized, self.assertRaises(Unauthorized,
self.app.folder1.restrictedTraverse, 'stuff') self.app.folder1.restrictedTraverse, 'stuff')
def testDefaultValueWhenUnathorized(self): def testDefaultValueWhenUnathorized(self):
......
...@@ -123,7 +123,7 @@ class UserFolderTests(unittest.TestCase): ...@@ -123,7 +123,7 @@ class UserFolderTests(unittest.TestCase):
uf = self._makeOne(app) uf = self._makeOne(app)
user = uf.validate(app.REQUEST, self._makeBasicAuthToken(), user = uf.validate(app.REQUEST, self._makeBasicAuthToken(),
['role1']) ['role1'])
self.failIfEqual(user, None) self.assertNotEqual(user, None)
self.assertEqual(user.getUserName(), 'user1') self.assertEqual(user.getUserName(), 'user1')
def testNotValidateWithoutAuth(self): def testNotValidateWithoutAuth(self):
......
...@@ -135,7 +135,7 @@ class TypeSniffingTestCase(unittest.TestCase): ...@@ -135,7 +135,7 @@ class TypeSniffingTestCase(unittest.TestCase):
f.close() f.close()
pt = PageTemplateFile(self.TEMPFILENAME) pt = PageTemplateFile(self.TEMPFILENAME)
pt_id = pt.getId() pt_id = pt.getId()
self.failUnlessEqual( self.assertEqual(
pt_id, desired_id, pt_id, desired_id,
'getId() returned %r. Expecting %r' % (pt_id, desired_id) 'getId() returned %r. Expecting %r' % (pt_id, desired_id)
) )
...@@ -148,7 +148,7 @@ class TypeSniffingTestCase(unittest.TestCase): ...@@ -148,7 +148,7 @@ class TypeSniffingTestCase(unittest.TestCase):
f.close() f.close()
pt = PageTemplateFile(self.TEMPFILENAME) pt = PageTemplateFile(self.TEMPFILENAME)
pt_path = pt.getPhysicalPath() pt_path = pt.getPhysicalPath()
self.failUnlessEqual( self.assertEqual(
pt_path, desired_path, pt_path, desired_path,
'getPhysicalPath() returned %r. Expecting %r' % ( 'getPhysicalPath() returned %r. Expecting %r' % (
desired_path, pt_path, desired_path, pt_path,
......
...@@ -136,8 +136,8 @@ class DI_Tests(unittest.TestCase): ...@@ -136,8 +136,8 @@ class DI_Tests(unittest.TestCase):
result, used = index._apply_index(req) result, used = index._apply_index(req)
if hasattr(result, 'keys'): if hasattr(result, 'keys'):
result = result.keys() result = result.keys()
self.failUnlessEqual(used, ('date',)) self.assertEqual(used, ('date',))
self.failUnlessEqual(len(result), len(expectedValues), self.assertEqual(len(result), len(expectedValues),
'%s | %s' % (result, expectedValues)) '%s | %s' % (result, expectedValues))
for k, v in expectedValues: for k, v in expectedValues:
self.assertTrue(k in result) self.assertTrue(k in result)
...@@ -175,8 +175,8 @@ class DI_Tests(unittest.TestCase): ...@@ -175,8 +175,8 @@ class DI_Tests(unittest.TestCase):
from DateTime import DateTime from DateTime import DateTime
index = self._makeOne() index = self._makeOne()
self.failUnlessEqual(len(index), 0) self.assertEqual(len(index), 0)
self.failUnlessEqual(len(index.referencedObjects()), 0) self.assertEqual(len(index.referencedObjects()), 0)
self.assertTrue(index.getEntryForObject(1234) is None) self.assertTrue(index.getEntryForObject(1234) is None)
marker = [] marker = []
...@@ -185,7 +185,7 @@ class DI_Tests(unittest.TestCase): ...@@ -185,7 +185,7 @@ class DI_Tests(unittest.TestCase):
self.assertTrue(index.hasUniqueValuesFor('date')) self.assertTrue(index.hasUniqueValuesFor('date'))
self.assertFalse(index.hasUniqueValuesFor('foo')) self.assertFalse(index.hasUniqueValuesFor('foo'))
self.failUnlessEqual(len(index.uniqueValues('date')), 0) self.assertEqual(len(index.uniqueValues('date')), 0)
self.assertTrue(index._apply_index({'zed': 12345}) is None) self.assertTrue(index._apply_index({'zed': 12345}) is None)
...@@ -211,8 +211,8 @@ class DI_Tests(unittest.TestCase): ...@@ -211,8 +211,8 @@ class DI_Tests(unittest.TestCase):
self._populateIndex(index) self._populateIndex(index)
values = self._getValues() values = self._getValues()
self.failUnlessEqual(len(index), len(values) - 2) # One dupe, one empty self.assertEqual(len(index), len(values) - 2) # One dupe, one empty
self.failUnlessEqual(len(index.referencedObjects()), len(values) - 1) self.assertEqual(len(index.referencedObjects()), len(values) - 1)
# One empty # One empty
self.assertTrue(index.getEntryForObject(1234) is None) self.assertTrue(index.getEntryForObject(1234) is None)
...@@ -222,10 +222,10 @@ class DI_Tests(unittest.TestCase): ...@@ -222,10 +222,10 @@ class DI_Tests(unittest.TestCase):
for k, v in values: for k, v in values:
if v.date(): if v.date():
self.failUnlessEqual(index.getEntryForObject(k), self.assertEqual(index.getEntryForObject(k),
self._convert(v.date())) self._convert(v.date()))
self.failUnlessEqual(len(index.uniqueValues('date')), len(values) - 2) self.assertEqual(len(index.uniqueValues('date')), len(values) - 2)
self.assertTrue(index._apply_index({'bar': 123}) is None) self.assertTrue(index._apply_index({'bar': 123}) is None)
self._checkApply(index, self._checkApply(index,
...@@ -258,7 +258,7 @@ class DI_Tests(unittest.TestCase): ...@@ -258,7 +258,7 @@ class DI_Tests(unittest.TestCase):
# and still correct for item 10 # and still correct for item 10
yr, mo, dy, hr, mn = v.date().utctimetuple()[:5] yr, mo, dy, hr, mn = v.date().utctimetuple()[:5]
val = (((yr * 12 + mo) * 31 + dy) * 24 + hr) * 60 + mn val = (((yr * 12 + mo) * 31 + dy) * 24 + hr) * 60 + mn
self.failUnlessEqual(index.getEntryForObject(k), val) self.assertEqual(index.getEntryForObject(k), val)
def test_removal(self): def test_removal(self):
""" DateIndex would hand back spurious entries when used as a """ DateIndex would hand back spurious entries when used as a
......
...@@ -36,7 +36,7 @@ class TestTransientObject(TestCase): ...@@ -36,7 +36,7 @@ class TestTransientObject(TestCase):
def test_id(self): def test_id(self):
t = self.t.new('xyzzy') t = self.t.new('xyzzy')
self.failIfEqual(t.getId(), 'xyzzy') # dont acquire self.assertNotEqual(t.getId(), 'xyzzy') # dont acquire
self.assertEqual(t.getContainerKey(), 'xyzzy') self.assertEqual(t.getContainerKey(), 'xyzzy')
def test_validate(self): def test_validate(self):
...@@ -62,12 +62,12 @@ class TestTransientObject(TestCase): ...@@ -62,12 +62,12 @@ class TestTransientObject(TestCase):
def test_getLastModifiedSet(self): def test_getLastModifiedSet(self):
t = self.t.new('xyzzy') t = self.t.new('xyzzy')
t['a'] = 1 t['a'] = 1
self.failIfEqual(t.getLastModified(), None) self.assertNotEqual(t.getLastModified(), None)
def testSetLastModified(self): def testSetLastModified(self):
t = self.t.new('xyzzy') t = self.t.new('xyzzy')
t.setLastModified() t.setLastModified()
self.failIfEqual(t.getLastModified(), None) self.assertNotEqual(t.getLastModified(), None)
def test_setLastAccessed(self): def test_setLastAccessed(self):
t = self.t.new('xyzzy') t = self.t.new('xyzzy')
......
...@@ -372,17 +372,17 @@ class TestRequestVariables(base.TestCase): ...@@ -372,17 +372,17 @@ class TestRequestVariables(base.TestCase):
def testRequestVariables(self): def testRequestVariables(self):
request = self.app.REQUEST request = self.app.REQUEST
self.failIfEqual(request.get('SERVER_NAME', ''), '') self.assertNotEqual(request.get('SERVER_NAME', ''), '')
self.failIfEqual(request.get('SERVER_PORT', ''), '') self.assertNotEqual(request.get('SERVER_PORT', ''), '')
self.failIfEqual(request.get('REQUEST_METHOD', ''), '') self.assertNotEqual(request.get('REQUEST_METHOD', ''), '')
self.failIfEqual(request.get('URL', ''), '') self.assertNotEqual(request.get('URL', ''), '')
self.failIfEqual(request.get('SERVER_URL', ''), '') self.assertNotEqual(request.get('SERVER_URL', ''), '')
self.failIfEqual(request.get('URL0', ''), '') self.assertNotEqual(request.get('URL0', ''), '')
self.failIfEqual(request.get('URL1', ''), '') self.assertNotEqual(request.get('URL1', ''), '')
self.failIfEqual(request.get('BASE0', ''), '') self.assertNotEqual(request.get('BASE0', ''), '')
self.failIfEqual(request.get('BASE1', ''), '') self.assertNotEqual(request.get('BASE1', ''), '')
self.failIfEqual(request.get('BASE2', ''), '') self.assertNotEqual(request.get('BASE2', ''), '')
self.failIfEqual(request.get('ACTUAL_URL', ''), '') self.assertNotEqual(request.get('ACTUAL_URL', ''), '')
import gc import gc
......
...@@ -70,7 +70,7 @@ class TestCopyPaste(ZopeTestCase.ZopeTestCase): ...@@ -70,7 +70,7 @@ class TestCopyPaste(ZopeTestCase.ZopeTestCase):
# _p_oids are None until we commit a subtransaction # _p_oids are None until we commit a subtransaction
self.assertEqual(self.folder._p_oid, None) self.assertEqual(self.folder._p_oid, None)
transaction.savepoint(optimistic=True) transaction.savepoint(optimistic=True)
self.failIfEqual(self.folder._p_oid, None) self.assertNotEqual(self.folder._p_oid, None)
def testCutPaste(self): def testCutPaste(self):
cb = self.folder.manage_cutObjects(['doc']) cb = self.folder.manage_cutObjects(['doc'])
...@@ -121,7 +121,7 @@ class TestImportExport(ZopeTestCase.ZopeTestCase): ...@@ -121,7 +121,7 @@ class TestImportExport(ZopeTestCase.ZopeTestCase):
# _p_oids are None until we commit a subtransaction # _p_oids are None until we commit a subtransaction
self.assertEqual(self.folder._p_oid, None) self.assertEqual(self.folder._p_oid, None)
transaction.savepoint(optimistic=True) transaction.savepoint(optimistic=True)
self.failIfEqual(self.folder._p_oid, None) self.assertNotEqual(self.folder._p_oid, None)
def testExport(self): def testExport(self):
self.folder.manage_exportObject('doc') self.folder.manage_exportObject('doc')
......
...@@ -260,7 +260,7 @@ class TestBaseRequest(unittest.TestCase, BaseRequest_factory): ...@@ -260,7 +260,7 @@ class TestBaseRequest(unittest.TestCase, BaseRequest_factory):
folder._setObject('objWithBD', self._makeObjectWithBD()) folder._setObject('objWithBD', self._makeObjectWithBD())
folder.objWithBD._default_path = [''] folder.objWithBD._default_path = ['']
r = self._makeOne(root) r = self._makeOne(root)
self.failUnlessRaises(NotFound, r.traverse, 'folder/objWithBD') self.assertRaises(NotFound, r.traverse, 'folder/objWithBD')
def test_traverse_withBBT_handles_AttributeError(self): def test_traverse_withBBT_handles_AttributeError(self):
# Test that if __bobo_traverse__ raises AttributeError # Test that if __bobo_traverse__ raises AttributeError
...@@ -273,7 +273,7 @@ class TestBaseRequest(unittest.TestCase, BaseRequest_factory): ...@@ -273,7 +273,7 @@ class TestBaseRequest(unittest.TestCase, BaseRequest_factory):
obj.__bobo_traverse__ = _faux___bobo_traverse__ obj.__bobo_traverse__ = _faux___bobo_traverse__
folder._setObject('objWithBBT', obj) folder._setObject('objWithBBT', obj)
r = self._makeOne(root) r = self._makeOne(root)
self.failUnlessRaises(NotFound, r.traverse, self.assertRaises(NotFound, r.traverse,
'folder/objWithBBT/bbt_foo') 'folder/objWithBBT/bbt_foo')
def test_traverse_UseTraversalDefault(self): def test_traverse_UseTraversalDefault(self):
...@@ -309,7 +309,7 @@ class TestBaseRequest(unittest.TestCase, BaseRequest_factory): ...@@ -309,7 +309,7 @@ class TestBaseRequest(unittest.TestCase, BaseRequest_factory):
folder._setObject('objWithBDBBT', self._makeObjectWithBDBBT()) folder._setObject('objWithBDBBT', self._makeObjectWithBDBBT())
folder.objWithBDBBT._default_path = ['xxx'] folder.objWithBDBBT._default_path = ['xxx']
r = self._makeOne(root) r = self._makeOne(root)
self.failUnlessRaises(NotFound, r.traverse, 'folder/objWithBDBBT') self.assertRaises(NotFound, r.traverse, 'folder/objWithBDBBT')
def test_traverse_slash(self): def test_traverse_slash(self):
root, folder = self._makeRootAndFolder() root, folder = self._makeRootAndFolder()
......
...@@ -25,10 +25,10 @@ class MapplyTests(unittest.TestCase): ...@@ -25,10 +25,10 @@ class MapplyTests(unittest.TestCase):
return '%d%d%d' % (a, b, c) return '%d%d%d' % (a, b, c)
values = {'a':2, 'b':3, 'c':5} values = {'a':2, 'b':3, 'c':5}
v = mapply(compute, (), values) v = mapply(compute, (), values)
self.failUnlessEqual(v, '235') self.assertEqual(v, '235')
v = mapply(compute, (7,), values) v = mapply(compute, (7,), values)
self.failUnlessEqual(v, '735') self.assertEqual(v, '735')
def testClass(self): def testClass(self):
values = {'a':2, 'b':3, 'c':5} values = {'a':2, 'b':3, 'c':5}
...@@ -39,11 +39,11 @@ class MapplyTests(unittest.TestCase): ...@@ -39,11 +39,11 @@ class MapplyTests(unittest.TestCase):
compute = __call__ compute = __call__
cc = c() cc = c()
v = mapply(cc, (), values) v = mapply(cc, (), values)
self.failUnlessEqual(v, '335') self.assertEqual(v, '335')
del values['c'] del values['c']
v = mapply(cc.compute, (), values) v = mapply(cc.compute, (), values)
self.failUnlessEqual(v, '334') self.assertEqual(v, '334')
class c2: class c2:
"""Must be a classic class.""" """Must be a classic class."""
...@@ -51,7 +51,7 @@ class MapplyTests(unittest.TestCase): ...@@ -51,7 +51,7 @@ class MapplyTests(unittest.TestCase):
c2inst = c2() c2inst = c2()
c2inst.__call__ = cc c2inst.__call__ = cc
v = mapply(c2inst, (), values) v = mapply(c2inst, (), values)
self.failUnlessEqual(v, '334') self.assertEqual(v, '334')
def testObjectWithCall(self): def testObjectWithCall(self):
# Make sure that the __call__ of an object can also be another # Make sure that the __call__ of an object can also be another
......
...@@ -156,7 +156,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase): ...@@ -156,7 +156,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
# XXX need to check that log messages get written to # XXX need to check that log messages get written to
# sys.stderr, not that the stream identity for the startup # sys.stderr, not that the stream identity for the startup
# handler matches # handler matches
#self.failUnlessEqual(starter.startup_handler.stream, sys.stderr) #self.assertEqual(starter.startup_handler.stream, sys.stderr)
conf = self.load_config_text(""" conf = self.load_config_text("""
instancehome <<INSTANCE_HOME>> instancehome <<INSTANCE_HOME>>
debug-mode off debug-mode off
...@@ -172,7 +172,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase): ...@@ -172,7 +172,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
# XXX need to check that log messages get written to # XXX need to check that log messages get written to
# sys.stderr, not that the stream identity for the startup # sys.stderr, not that the stream identity for the startup
# handler matches # handler matches
#self.failIfEqual(starter.startup_handler.stream, sys.stderr) #self.assertNotEqual(starter.startup_handler.stream, sys.stderr)
def testSetupZServerThreads(self): def testSetupZServerThreads(self):
conf = self.load_config_text(""" conf = self.load_config_text("""
...@@ -361,7 +361,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase): ...@@ -361,7 +361,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
try: try:
starter = self.get_starter(conf) starter = self.get_starter(conf)
starter.setupInterpreter() starter.setupInterpreter()
self.failUnlessEqual( sys.getcheckinterval() , newcheckinterval ) self.assertEqual( sys.getcheckinterval() , newcheckinterval )
finally: finally:
sys.setcheckinterval(oldcheckinterval) sys.setcheckinterval(oldcheckinterval)
...@@ -385,7 +385,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase): ...@@ -385,7 +385,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
f.close() f.close()
configure(fname) configure(fname)
new_config = getConfiguration() new_config = getConfiguration()
self.failUnlessEqual(new_config.zserver_threads, 100) self.assertEqual(new_config.zserver_threads, 100)
finally: finally:
sys.argv = old_argv sys.argv = old_argv
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment