Skip to content

Commit e11b045

Browse files
committed
Init testing module
1 parent 6ece09b commit e11b045

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

Makefile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
OPENERP_ADDONS=../ocb-addons,../ocb-web/addons,../banking-addons-reconcile,../file-exchange,.
3+
COVERAGE?=coverage
4+
COVERAGE_REPORT=$(COVERAGE) report -m
5+
COVERAGE_PARSE_RATE=$(COVERAGE_REPORT) | tail -n 1 | sed "s/ \+/ /g" | cut -d" " -f4
6+
OE=whereis oe | cut -d" " -f2
7+
8+
MODULE_NAME=account_statement_be2bill
9+
MODULE_PATH=$(MODULE_NAME)
10+
DB_NAME=test_$(MODULE_NAME)
11+
DROP_DB=echo 'DROP DATABASE $(DB_NAME);' | psql
12+
13+
14+
test-oe:
15+
#createdb $(DB_NAME)
16+
#openerp-server --addons=$(OPENERP_ADDONS) -i $(MODULE_NAME) --stop-after-init -d $(DB_NAME)
17+
#$(COVERAGE) run -p --omit=$(MODULE_PATH)/__openerp__.py --source=$(MODULE_PATH)
18+
oe run-tests -d $(DB_NAME) --addons $(OPENERP_ADDONS) -m $(MODULE_NAME) #|| $(DROP_DB) && exit 1
19+
#$(DROP_DB)
20+
#$(COVERAGE) combine
21+
#$(COVERAGE_REPORT)
22+
#if [ "100%" != "`$(COVERAGE_PARSE_RATE)`" ] ; then exit 1 ; fi
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
import test_test
3+
4+
fast_suite = [test_test]
5+
checks = [test_test]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import unittest2
2+
from openerp.tests.common import TransactionCase
3+
4+
class TestTest(unittest2.TestCase):
5+
def test_it(self):
6+
self.assertEquals(1, 1)
7+
8+
def test_fail(self):
9+
self.assertEquals(1, 2)
10+
11+
12+
class TestResPartner(TransactionCase):
13+
def test_create(self):
14+
cr, uid = self.cr, self.uid
15+
vals = {
16+
'name': 'nice guy',
17+
'is_nice': True,
18+
}
19+
self.registry('res.partner').create(cr, uid, vals)
20+
21+
def test_method(self):
22+
cr, uid = self.cr, self.uid
23+
self.registry('res.partner').method(cr, uid, [])

dependencies.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bzr branch lp:ocb-addons/7.0 ocb-addons
2+
bzr branch lp:ocb-web/7.0 ocb-web
3+
bzr branch bzr+ssh://bazaar.launchpad.net/~akretion-team/+junk/pending-merge-rapprochement-bancaire/ banking-addons-reconcile
4+
bzr branch bzr+ssh://bazaar.launchpad.net/+branch/file-exchange/ file-exchange

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bzr+ssh://bazaar.launchpad.net/+branch/openerp-command/@191#egg=openerp-command

0 commit comments

Comments
 (0)