Skip to Content
Menu
This question has been flagged
1285 Views

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.


Avatar
Discard
Related Posts Replies Views Activity
0
Aug 21
3
3
May 18
3567
2
Aug 24
524
1
Mar 24
1087
1
Apr 23
2896