Refactor to add separate letter branding client

We were getting all letter logos from a method in the email branding
client. Since we will be adding more client methods to deal with
letters, it makes things clearer to separate the email and letter
branding clients.
This commit is contained in:
Katie Smith
2019-01-23 12:27:14 +00:00
parent 284ec3ee3e
commit 0bf3a4b16d
10 changed files with 41 additions and 26 deletions

View File

@@ -23,9 +23,6 @@ class EmailBrandingClient(NotifyAdminAPIClient):
return branding['id']
return None
def get_letter_email_branding(self):
return self.get(url='/dvla_organisations')
@cache.delete('email_branding')
def create_email_branding(self, logo, name, text, colour, domain, brand_type):
data = {

View File

@@ -0,0 +1,13 @@
from app.notify_client import NotifyAdminAPIClient
class LetterBrandingClient(NotifyAdminAPIClient):
def __init__(self):
super().__init__("a" * 73, "b")
def get_letter_branding(self):
return self.get(url='/dvla_organisations')
letter_branding_client = LetterBrandingClient()