def test_save_obj(self): """ Method should raise NotImplementedError in the ApiBase class. """ request = testing.DummyRequest() obj = Mock() # create a direct instance of ApiBase api = ApiBase(request) with self.assertRaises(NotImplementedError): api.save_obj(obj)