【发布时间】:2021-08-25 05:12:56
【问题描述】:
我是 odoo 的新手。我正在使用 odoo v11.00 我正在尝试测试我的自定义模块的模型。
这是文件结构
course_management
|-- ...
`-- tests
|-- __init__.py
|-- test_course_management_course.py
这里是test_course_management_course.py文件的内容
from odoo.tests import common
class TestCourseManagement(common.TransactionCase):
def test_creation_end_date(self):
test_course = self.env['course.management.course'].create({
'name': 'TestProjectfromtestcase'
})
self.assertEqual(test_course.name, 'TestProject')
我试过的命令如下
./odoo-bin -c /home/bs632/odoo.conf -u course_management --test-enable -d testDB
./odoo-bin -c /home/bs632/odoo.conf --log-level=test -u course_management --test-enable -d testDB --test-report-directory=./testlog.
./odoo-bin -c /home/bs632/odoo.conf --log-level=test -u course_management --test-enable -d testDB
./odoo-bin -c /home/bs632/odoo.conf --log-level=test -i course_management --test-enable -d testDB
但是测试没有运行。
【问题讨论】: