Skip to Content
मेन्यू
This question has been flagged
1 Reply
5688 Views

I'm writing unit tests for my module and I'd like to do this simple check:

self.assertIs(self.board, wi.board_id)

but I get the aforementioned error. Though, self.assertEqual() works. Is it safe to use assertEqual() for such a test?

Avatar
Discard
Best Answer

assertEqual(a, b)     a == b     
assertIs(a, b)     a is b

So yes, It is safe use assertEquals. If hoy take a look to Odoo test, equals is used a lot.

Avatar
Discard
Related Posts Replies Views Activity
0
अक्तू॰ 23
1303
0
अक्तू॰ 23
2137
0
नव॰ 20
3055
2
अक्तू॰ 23
2668
0
जून 23
3684