跳至內容
選單
此問題已被標幟
2000 瀏覽次數

I am new to odoo. I am trying to test a custom module. But the test doesn't run.

Here is the file structure 


```
course_management
|-- ...
`-- tests
|-- __init__.py
|-- test_course_management_course.py
```


Here is the the content of test_course_management_course.py file 


from odoo.tests import common

```
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')

```


And the commands I have tried are as follows

```
./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
```

But the test doesn't run.


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
8月 21
4
3
5月 18
4786
0
6月 25
2744
2
8月 24
2510
1
3月 24
3136