Exemple #1
0
 def test_nonzero_when_stubbed(self):
     m = Mock()
     stub(m.__nonzero__).expect().returns(False)
     self.assertFalse(m.__nonzero__())
Exemple #2
0
 def test_nonzero_when_stubbed(self):
   m = Mock()
   stub(m.__nonzero__).expect().returns(False)
   self.assertFalse( m.__nonzero__() )
Exemple #3
0
 def test_nonzero_returns_true_when_unstubbed(self):
     m = Mock()
     self.assertTrue(m.__nonzero__())
Exemple #4
0
 def test_nonzero_returns_true_when_unstubbed(self):
   m = Mock()
   self.assertTrue( m.__nonzero__() )