Compare commits
5 Commits
V5_unit_te
...
V5_unit_te
Author | SHA1 | Date | |
---|---|---|---|
3a88646f7a | |||
90f5390f3b | |||
272eeb0813 | |||
38ad9c7a9c | |||
799104695f |
@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import test_coworking_event
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Coworking cowoker testing module """
|
||||
|
||||
from datetime import date
|
||||
from odoo import fields
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
class TestCoworkingEvent(TransactionCase):
|
||||
""" Coworking cowoker testing """
|
||||
|
||||
# def setUp(self, *args, **kwargs):
|
||||
# """ Bootstrap testing """
|
||||
# super(TestCoworkingEvent, self).setUp(*args, **kwargs)
|
||||
# data = {'title': 'Mon evenement', 'is_coworker': True}
|
||||
# self.homer = self.env['res.partner'].create(data)
|
||||
|
||||
def test_contact_date(self):
|
||||
pass
|
@ -29,5 +29,5 @@
|
||||
'views/relation_menu.xml',
|
||||
'views/relation_views.xml',
|
||||
'views/res_partner_views.xml'],
|
||||
'depends': ['coworking_coworker', 'coworking_event']
|
||||
'depends': ['coworking_coworker']
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import test_coworking_relation
|
@ -1,29 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Coworking cowoker testing module """
|
||||
|
||||
from datetime import date
|
||||
from odoo import fields
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
class TestCoworkingRelation(TransactionCase):
|
||||
""" Coworking cowoker testing """
|
||||
|
||||
def test_if_coworker_is_same(self):
|
||||
""" Test coworker1.id and coworker2.id is identical """
|
||||
coworker1 = self.env['res.partner'].create({'name': 'Marge Simpson',
|
||||
'is_coworker': True})
|
||||
coworker2 = self.env['res.partner'].create({'name': 'Bart Simpson',
|
||||
'is_coworker': True})
|
||||
|
||||
relation = self.env['coworking.relation'].create({'coworker1': coworker1.id,
|
||||
'coworker2': coworker2.id,
|
||||
'relation': 'Mère'})
|
||||
self.assertEqual(relation.relation, u'Mère')
|
||||
|
||||
with self.assertRaises(ValidationError) as err:
|
||||
self.env['coworking.relation'].create({'coworker1': coworker1.id,
|
||||
'coworker2': coworker1.id,
|
||||
'relation': 'Mère'})
|
||||
self.assertIn(u'Coworker1 is same coworker2', unicode(err.exception))
|
Loading…
x
Reference in New Issue
Block a user