Esempio n. 1
0
def test_add_inbound_sms_number(mocker, api_user_active):
    inbound_number = "12345678901"
    expected_url = "/inbound-number/add"
    client = InboundNumberClient()

    mock_post = mocker.patch(
        "app.notify_client.inbound_number_client.InboundNumberClient.post")

    client.add_inbound_sms_number(inbound_number)
    mock_post.assert_called_once_with(url=expected_url,
                                      data={"inbound_number": inbound_number})
def test_add_inbound_sms_number(mocker, api_user_active):
    inbound_number = '12345678901'
    expected_url = '/inbound-number/add'
    client = InboundNumberClient()

    mock_post = mocker.patch('app.notify_client.inbound_number_client.InboundNumberClient.post')

    client.add_inbound_sms_number(inbound_number)
    mock_post.assert_called_once_with(
        url=expected_url,
        data={'inbound_number': inbound_number}
    )
Esempio n. 3
0
job_api_client = JobApiClient()
notification_api_client = NotificationApiClient()
support_api_client = SupportApiClient()
status_api_client = StatusApiClient()
invite_api_client = InviteApiClient()
template_statistics_client = TemplateStatisticsApiClient()
events_api_client = EventsApiClient()
provider_client = ProviderClient()
email_branding_client = EmailBrandingClient()
organisations_client = OrganisationsClient()
org_invite_api_client = OrgInviteApiClient()
asset_fingerprinter = AssetFingerprinter()
statsd_client = StatsdClient()
deskpro_client = DeskproClient()
letter_jobs_client = LetterJobsClient()
inbound_number_client = InboundNumberClient()
billing_api_client = BillingAPIClient()

# The current service attached to the request stack.
current_service = LocalProxy(partial(_lookup_req_object, 'service'))

# The current organisation attached to the request stack.
current_organisation = LocalProxy(partial(_lookup_req_object, 'organisation'))


def create_app(application):
    setup_commands(application)

    notify_environment = os.environ['NOTIFY_ENVIRONMENT']

    application.config.from_object(configs[notify_environment])