Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(88)

Side by Side Diff: tests/test_sale_shipment_cost.py

Issue 4214045: New module sale_shipment_cost (Closed)
Patch Set: Created 14 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« __tryton__.py ('K') | « tests/scenario_sale_shipment_cost.rst ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #This file is part of Tryton. The COPYRIGHT file at the top level of
3 #this repository contains the full copyright notices and license terms.
4 from __future__ import with_statement
5 import sys, os
6 DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
7 '..', '..', '..', '..', '..', 'trytond')))
8 if os.path.isdir(DIR):
9 sys.path.insert(0, os.path.dirname(DIR))
10
11 import unittest
12 import doctest
13 import trytond.tests.test_tryton
14 from trytond.tests.test_tryton import test_view
15 from trytond.backend.sqlite.database import Database as SQLiteDatabase
16
17
18 class SaleShipmentCostTestCase(unittest.TestCase):
19 '''
20 Test Sale Shipment Cost module.
21 '''
22
23 def setUp(self):
24 trytond.tests.test_tryton.install_module('sale_shipment_cost')
25
26 def test0005views(self):
27 '''
28 Test views.
29 '''
30 test_view('sale_shipment_cost')
31
32 def doctest_dropdb(test):
33 '''
34 Remove sqlite memory database
35 '''
36 database = SQLiteDatabase().connect()
37 cursor = database.cursor(autocommit=True)
38 try:
39 database.drop(cursor, ':memory:')
40 cursor.commit()
41 finally:
42 cursor.close()
43
44 def suite():
45 suite = trytond.tests.test_tryton.suite()
46 suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
47 SaleShipmentCostTestCase))
48 suite.addTests(doctest.DocFileSuite('scenario_sale_shipment_cost.rst',
49 setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8'))
50 return suite
51
52 if __name__ == '__main__':
53 unittest.TextTestRunner(verbosity=2).run(suite())
OLDNEW
« __tryton__.py ('K') | « tests/scenario_sale_shipment_cost.rst ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b