Exemplo n.º 1
0
 def test__returns_mismatch_when_its_a_non_callable_object(self):
     matcher = IsCallableMock()
     result = matcher.match(object())
     self.assertMismatch(result, " is not callable")
Exemplo n.º 2
0
 def test__returns_mismatch_when_its_a_non_callable_autospec(self):
     mock = create_autospec(None)
     matcher = IsCallableMock()
     result = matcher.match(mock)
     self.assertMismatch(result, " is not callable")
Exemplo n.º 3
0
 def test__returns_none_when_its_a_callable_autospec(self):
     mock = create_autospec(lambda: None)
     matcher = IsCallableMock()
     result = matcher.match(mock)
     self.assertIsNone(result)
Exemplo n.º 4
0
 def test__returns_mismatch_when_its_a_non_callable_mock(self):
     mock = NonCallableMock()
     matcher = IsCallableMock()
     result = matcher.match(mock)
     self.assertMismatch(result, " is not callable")
Exemplo n.º 5
0
 def test__returns_none_when_its_a_callable_mock(self):
     mock = Mock()
     matcher = IsCallableMock()
     result = matcher.match(mock)
     self.assertIsNone(result)