Commit 9a410005 authored by Jérome Perrin's avatar Jérome Perrin

fix undefined names


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16471 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4107b56f
...@@ -26,13 +26,7 @@ ...@@ -26,13 +26,7 @@
# #
############################################################################## ##############################################################################
import os, sys import unittest
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
# Needed in order to have a log file inside the current folder
os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
os.environ['EVENT_LOG_SEVERITY'] = '-300'
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
...@@ -301,12 +295,8 @@ class TestArchive(InventoryAPITestCase): ...@@ -301,12 +295,8 @@ class TestArchive(InventoryAPITestCase):
self.assertEquals(100, getInventory(node=self.node.getRelativeUrl())) self.assertEquals(100, getInventory(node=self.node.getRelativeUrl()))
if __name__ == '__main__': def test_suite():
framework() suite = unittest.TestSuite()
else: suite.addTest(unittest.makeSuite(TestArchive))
import unittest return suite
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestArchive))
return suite
...@@ -27,32 +27,11 @@ ...@@ -27,32 +27,11 @@
############################################################################## ##############################################################################
import unittest
#
# Skeleton ZopeTestCase
#
from random import randint
import os, sys
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
# Needed in order to have a log file inside the current folder
os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
os.environ['EVENT_LOG_SEVERITY'] = '-300'
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager, noSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from DateTime import DateTime
from Acquisition import aq_base, aq_inner
from zLOG import LOG from zLOG import LOG
from Products.ERP5Type.DateUtils import addToDate
import time
import os
from Products.ERP5Type import product_path
from DateTime import DateTime
class Test(ERP5TypeTestCase): class Test(ERP5TypeTestCase):
""" """
...@@ -165,19 +144,8 @@ class Test(ERP5TypeTestCase): ...@@ -165,19 +144,8 @@ class Test(ERP5TypeTestCase):
self.assertEquals(len(organisation_list),0) self.assertEquals(len(organisation_list),0)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test))
return suite
if __name__ == '__main__':
framework()
else:
import unittest
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test))
return suite
...@@ -26,13 +26,8 @@ ...@@ -26,13 +26,8 @@
# #
############################################################################## ##############################################################################
import os, sys import unittest
if __name__ == '__main__': import sys
execfile(os.path.join(sys.path[0], 'framework.py'))
# Needed in order to have a log file inside the current folder
os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
os.environ['EVENT_LOG_SEVERITY'] = '-300'
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
...@@ -1820,12 +1815,9 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -1820,12 +1815,9 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
ctool(title='The Document', ctool(title='The Document',
owner='somebody else')]) owner='somebody else')])
if __name__ == '__main__':
framework() def test_suite():
else: suite = unittest.TestSuite()
import unittest suite.addTest(unittest.makeSuite(TestERP5Catalog))
def test_suite(): return suite
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5Catalog))
return suite
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