Merge pull request #794 from alphagov/refactior

Rename api_client to service_api_client
This commit is contained in:
Leo Hemsted
2016-07-19 13:26:34 +01:00
committed by GitHub
13 changed files with 6 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ from werkzeug.local import LocalProxy
import app.proxy_fix
from app.asset_fingerprinter import AssetFingerprinter
from app.its_dangerous_session import ItsdangerousSessionInterface
from app.notify_client.api_client import ServiceAPIClient
from app.notify_client.service_api_client import ServiceAPIClient
from app.notify_client.api_key_api_client import ApiKeyApiClient
from app.notify_client.invite_api_client import InviteApiClient
from app.notify_client.job_api_client import JobApiClient

View File

@@ -4,7 +4,7 @@ from flask_login import login_required
from app import service_api_client
from app.main import main
from app.utils import user_has_permissions
from app.notify_client.api_client import ServicesBrowsableItem
from app.notify_client.service_api_client import ServicesBrowsableItem
@main.route("/all-services")

View File

@@ -2,7 +2,7 @@ from flask import (render_template, redirect, url_for, session)
from flask_login import login_required, current_user
from app.main import main
from app import service_api_client
from app.notify_client.api_client import ServicesBrowsableItem
from app.notify_client.service_api_client import ServicesBrowsableItem
@main.route("/services")

View File

@@ -1,4 +1,4 @@
from app.notify_client.api_client import ServiceAPIClient
from app.notify_client.service_api_client import ServiceAPIClient
from tests.conftest import fake_uuid
@@ -13,8 +13,8 @@ def test_client_posts_archived_true_when_deleting_template(mocker):
expected_url = '/service/{}/template/{}'.format(service_id, template_id)
client = ServiceAPIClient()
mock_post = mocker.patch('app.notify_client.api_client.ServiceAPIClient.post')
mock_attach_user = mocker.patch('app.notify_client.api_client._attach_current_user',
mock_post = mocker.patch('app.notify_client.service_api_client.ServiceAPIClient.post')
mock_attach_user = mocker.patch('app.notify_client.service_api_client._attach_current_user',
side_effect=lambda x: x.update({'created_by': fake_uuid}))
client.delete_service_template(service_id, template_id)