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

Side by Side Diff: tests/test_account_stock_continental.py

Issue 2142048: New module account_stock_continental (Closed)
Patch Set: Refactoring: base the code on supplier/customer instead of input/output Created 14 years, 3 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
« no previous file with comments | « tests/scenario_account_stock_continental.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
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 AccountStockContinentalTestCase(unittest.TestCase):
19 '''
20 Test Account Stock Continental module.
21 '''
22
23 def setUp(self):
24 trytond.tests.test_tryton.install_module('account_stock_continental')
25
26 def test0005views(self):
27 '''
28 Test views.
29 '''
30 test_view('account_stock_continental')
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 AccountStockContinentalTestCase))
48 suite.addTests(doctest.DocFileSuite('scenario_account_stock_continental.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
« no previous file with comments | « tests/scenario_account_stock_continental.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