def METHOD_NAME(self):
    repo_id = repo_name("save")
    save_directory = self.cache_dir / repo_id
    config = {"hello": "world"}
    mocked_model = DummyModel()
    mocked_model.push_to_hub = Mock()
    mocked_model._save_pretrained = Mock()  # disable _save_pretrained to speed-up
    # Not pushed to hub
    mocked_model.save_pretrained(save_directory)
    mocked_model.push_to_hub.assert_not_called()
    # Push to hub with repo_id
    mocked_model.save_pretrained(save_directory, push_to_hub=True, repo_id="CustomID", config=config)
    mocked_model.push_to_hub.assert_called_with(repo_id="CustomID", config=config)
    # Push to hub with default repo_id (based on dir name)
    mocked_model.save_pretrained(save_directory, push_to_hub=True, config=config)
    mocked_model.push_to_hub.assert_called_with(repo_id=repo_id, config=config)