diff --git a/tests/test_stock.py b/tests/test_stock.py index 25166ae638..e4c0e7a4f6 100644 --- a/tests/test_stock.py +++ b/tests/test_stock.py @@ -2,6 +2,9 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. +import logging +logging.basicConfig(level=logging.FATAL) + import sys, os DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..', '..', '..', '..', '..', 'trytond'))) @@ -10,7 +13,7 @@ if os.path.isdir(DIR): import unittest import trytond.tests.test_tryton -from trytond.tests.test_tryton import RPCProxy, CONTEXT, SOCK, test_view +from trytond.tests.test_tryton import test_view class StockTestCase(unittest.TestCase): ''' @@ -19,7 +22,6 @@ class StockTestCase(unittest.TestCase): def setUp(self): trytond.tests.test_tryton.install_module('stock') - self.location = RPCProxy('stock.location') def test0005views(self): ''' @@ -28,11 +30,9 @@ class StockTestCase(unittest.TestCase): self.assertRaises(Exception, test_view('stock')) def suite(): - return unittest.TestLoader().loadTestsFromTestCase(StockTestCase) + suite = trytond.tests.test_tryton.suite() + suite.addTests(unittest.TestLoader().loadTestsFromTestCase(StockTestCase)) + return suite if __name__ == '__main__': - suiteTrytond = trytond.tests.test_tryton.suite() - suiteStock = suite() - alltests = unittest.TestSuite([suiteTrytond, suiteStock]) - unittest.TextTestRunner(verbosity=2).run(alltests) - SOCK.disconnect() + unittest.TextTestRunner(verbosity=2).run(suite())