def testCreateFromString(self, ceptMock): term = Term() term = term.createFromString("fox") # Check that our mock object was called ceptMock.assert_called_with("fox") # Check that we have a Term type self.assertIsInstance(term, Term)