mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 04:28:25 -04:00
Make it clear that client do not use __init__
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.
This commit is contained in:
@@ -9,9 +9,7 @@ class ServiceAPIClient(NotificationsAPIClient):
|
||||
# Fudge assert in the super __init__ so
|
||||
# we can set those variables later.
|
||||
def __init__(self):
|
||||
super(ServiceAPIClient, self).__init__("api_url",
|
||||
"client",
|
||||
"api_key")
|
||||
super(self.__class__, self).__init__("a", "b", "c")
|
||||
|
||||
def init_app(self, application):
|
||||
self.base_url = application.config['API_HOST_NAME']
|
||||
|
||||
Reference in New Issue
Block a user