Exemple #1
0
 def test060_and_match(self):
     spy = SinonSpy()
     stub = SinonStub()
     m = SinonMatcher.instanceOf(spy).and_match(
         SinonMatcher.instanceOf(stub))
     self.assertFalse(m.mtest(spy))
     self.assertTrue(m.mtest(stub))
 def test51_instanceOf_instance(self):
     spy = SinonSpy()
     stub = SinonStub()
     m = SinonMatcher.instanceOf(spy)
     self.assertTrue(m.mtest(spy))
     self.assertTrue(m.mtest(stub))
 def test50_instanceOf_class(self):
     fto = ForTestOnly()
     with self.assertRaises(Exception) as context:
         m = SinonMatcher.instanceOf(ForTestOnly)