def METHOD_NAME(self):
    stored_model = Model(count=52)
    filename = os.path.join(self.tmpdir, "model.pkl")
    with open(filename, "wb") as pickled_object:
        pickle.dump(stored_model, pickled_object)
    def modify_model(*args, **kwargs):
        model.count = 23
        return mock.DEFAULT
    model = Model(count=19)
    with mock.patch.object(self.toolkit, "view_application") as mock_view:
        mock_view.side_effect = modify_model
        with self.assertWarns(DeprecationWarning):
            model.configure_traits(filename=filename)
    self.assertEqual(model.count, 23)
    with open(filename, "rb") as pickled_object:
        unpickled = pickle.load(pickled_object)
    self.assertIsInstance(unpickled, Model)
    self.assertEqual(unpickled.count, model.count)