def METHOD_NAME():
    """
    Ensure the expected calls are made via, the requests module, to the
    PythonAnywhere API in order to deploy the application.
    """
    instance = "www"
    username = "test_user"
    token = "a_test_token"
    files = {
        # attempt to upload this test file :-)
        "app.py": os.path.abspath(__file__),
    }
    app_name = "app"
    progress = mock.MagicMock()  # Instance of a modal progress indicator.
    paw = workers.PythonAnywhereWorker(
        instance, username, token, files, app_name, progress
    )
    paw.error = mock.MagicMock()
    paw.finished = mock.MagicMock()
    mock_response = mock.MagicMock()
    mock_response.json.return_value = []  # assuming no existing app.
    mock_requests = mock.MagicMock()
    mock_requests.get.return_value = mock_response
    mock_requests.post.return_value = mock_response
    mock_requests.put.return_value = mock_response
    with mock.patch("mu.interface.workers.requests", mock_requests):
        paw.run()
    progress.setMaximum.assert_called_once_with(len(files) + 5)
    assert progress.setValue.call_count == len(files) + 5
    paw.finished.emit.assert_called_once_with("test_user.pythonanywhere.com")
    assert paw.error.emit.call_count == 0
    # Expected number of calls to API take place.
    assert mock_requests.get.call_count == 1
    assert mock_requests.put.call_count == 1
    assert mock_requests.post.call_count == 5