def test_add_after_other_unnamed_mock_ordering(self): other_mock = pmock.Mock() other_mock.expects(pmock.OnceInvocationMatcher()).method("rooster") self.assert_(self.builder.after("rooster", other_mock) is not None) self.assert_(isinstance(self.mocker.added_matcher, pmock.InvokedAfterMatcher)) self.assertEqual(str(self.mocker.added_matcher), ".after('rooster' on mock '%s')" % pmock.mock_str(other_mock))
def test_get_unnamed(self): mock = pmock.Mock() self.assertEqual(mock.get_name(), pmock.mock_str(mock))