def METHOD_NAME(self, mock_warn, mock_gen, _):
    cmds.write_settings(MOCK_SETTINGS["settings"])
    mock_warn.assert_called_once()
    self.assertDictEqual(
        MOCK_SETTINGS, mock_gen.mock_calls[0][1][0].tethys_portal_settings
    )