trytond-sale_margin/tests/test_sale_margin.py

35 lines
1.1 KiB
Python
Raw Normal View History

2012-07-24 11:56:39 +02:00
#!/usr/bin/env python
2014-11-05 17:17:48 +01:00
# This file is part sale_margin module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
2012-07-24 11:56:39 +02:00
import unittest
2013-10-03 14:11:02 +02:00
import doctest
2012-07-24 11:56:39 +02:00
import trytond.tests.test_tryton
2013-04-26 15:00:04 +02:00
from trytond.tests.test_tryton import test_view, test_depends
2014-11-05 17:17:48 +01:00
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
2013-04-26 15:00:04 +02:00
2012-07-24 11:56:39 +02:00
class SaleMarginTestCase(unittest.TestCase):
2014-11-05 17:17:48 +01:00
'Test Sale Margin module'
2012-07-24 11:56:39 +02:00
def setUp(self):
trytond.tests.test_tryton.install_module('sale_margin')
def test0005views(self):
2014-11-05 17:17:48 +01:00
'Test views'
2012-07-24 11:56:39 +02:00
test_view('sale_margin')
def test0006depends(self):
2014-11-05 17:17:48 +01:00
'Test depends'
2012-07-24 11:56:39 +02:00
test_depends()
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
SaleMarginTestCase))
2013-10-03 14:11:02 +02:00
suite.addTests(doctest.DocFileSuite('scenario_sale_margin.rst',
2014-11-05 17:17:48 +01:00
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
2013-10-03 14:11:02 +02:00
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
2012-07-24 11:56:39 +02:00
return suite