mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
The clients never get passed useful values to their `__init__` methods. Rather the real values are passed through later using the `init_app` method. So it should be an error if the client is relying on the values that get passed to it’s init method. Easiest way to ensure this is by making the `__init__` method not expect any arguments and passing fake values to the `Super` call.
15 lines
470 B
Python
15 lines
470 B
Python
from notifications_python_client.base import BaseAPIClient
|
|
|
|
|
|
class StatusApiClient(BaseAPIClient):
|
|
def __init__(self):
|
|
super(self.__class__, self).__init__("a", "b", "c")
|
|
|
|
def init_app(self, app):
|
|
self.base_url = app.config['API_HOST_NAME']
|
|
self.service_id = app.config['ADMIN_CLIENT_USER_NAME']
|
|
self.api_key = app.config['ADMIN_CLIENT_SECRET']
|
|
|
|
def get_status(self, *params):
|
|
return self.get(url='/_status', *params)
|