def METHOD_NAME(mocker, app, cli_run, g_users, g_repositories):
    """Test 'assign' CLI."""
    rh_mock = mocker.patch.object(GitHubAPI, 'remove_hook')
    ch_mock = mocker.patch.object(GitHubAPI, 'create_hook')
    ret = cli_run('assign u2@foo.bar 8000 --yes-i-know -E')
    assert ret.exit_code == 0
    rh_mock.assert_called_once_with(8000, 'foo/bar')
    ch_mock.assert_called_once_with(8000, 'foo/bar')