mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-27 03:09:11 -04:00
make letters error if user not logged in
also added tests for the various hiding logic points also added new logged_in_client in conftest - so you dont need to patch all those stupid API calls for get user and get service
This commit is contained in:
@@ -40,9 +40,9 @@ def created_by_json(id_, name='', email_address=''):
|
||||
|
||||
|
||||
def service_json(
|
||||
id_,
|
||||
name,
|
||||
users,
|
||||
id_='1234',
|
||||
name='Test Service',
|
||||
users=None,
|
||||
message_limit=1000,
|
||||
active=False,
|
||||
restricted=True,
|
||||
@@ -50,9 +50,12 @@ def service_json(
|
||||
reply_to_email_address=None,
|
||||
sms_sender=None,
|
||||
research_mode=False,
|
||||
organisation='organisation-id',
|
||||
can_send_letters=False,
|
||||
organisation=None,
|
||||
branding='govuk'
|
||||
):
|
||||
if users is None:
|
||||
users = []
|
||||
return {
|
||||
'id': id_,
|
||||
'name': name,
|
||||
@@ -64,6 +67,7 @@ def service_json(
|
||||
'reply_to_email_address': reply_to_email_address,
|
||||
'sms_sender': sms_sender,
|
||||
'research_mode': research_mode,
|
||||
'can_send_letters': can_send_letters,
|
||||
'organisation': organisation,
|
||||
'branding': branding,
|
||||
'created_at': str(datetime.utcnow())
|
||||
|
||||
Reference in New Issue
Block a user