Re: customer compare in assertEqual

2018-10-31 Thread Stone Zhong
On Monday, October 29, 2018 at 5:29:11 PM UTC-7, Stone Zhong wrote: > Hi There, > > Now I want to make sure my code calls a function foo with an object t, > however, foo.assert_called_once_with(t) does not work, since t is a model > object and the code may load a different copy of t, so what I r

Re: customer compare in assertEqual

2018-10-30 Thread Peter Otten
Stone Zhong wrote: > Hi There, > > Now I want to make sure my code calls a function foo with an object t, > however, foo.assert_called_once_with(t) does not work, since t is a model > object and the code may load a different copy of t, so what I really want > to test is "It calls foo with t where

Re: customer compare in assertEqual

2018-10-29 Thread Stone Zhong
On Monday, October 29, 2018 at 5:29:11 PM UTC-7, Stone Zhong wrote: > Hi There, > > Now I want to make sure my code calls a function foo with an object t, > however, foo.assert_called_once_with(t) does not work, since t is a model > object and the code may load a different copy of t, so what I r