def METHOD_NAME(self):
    # Check for deprecation warning when *edit* is false.
    model = Model()
    with mock.patch.object(self.toolkit, "view_application") as mock_view:
        mock_view.return_value = True
        with self.assertWarns(DeprecationWarning):
            model.configure_traits(edit=False)
    mock_view.assert_not_called()