def test_nonzero_when_stubbed(self): m = Mock() stub(m.__nonzero__).expect().returns(False) self.assertFalse(m.__nonzero__())
def test_nonzero_when_stubbed(self): m = Mock() stub(m.__nonzero__).expect().returns(False) self.assertFalse( m.__nonzero__() )
def test_nonzero_returns_true_when_unstubbed(self): m = Mock() self.assertTrue(m.__nonzero__())
def test_nonzero_returns_true_when_unstubbed(self): m = Mock() self.assertTrue( m.__nonzero__() )