mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
make job.created_by nullable
Since letter jobs from the API aren't created by any single individual, lets make created_by nullable. Note: We'll have to make sure that we update the admin app to handle these jobs nicely
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from flask import url_for, json
|
||||
@@ -11,9 +10,6 @@ from tests import create_authorization_header
|
||||
from tests.app.db import create_service, create_template
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skip('Leters not currently implemented')
|
||||
|
||||
|
||||
def letter_request(client, data, service_id, _expected_status=201):
|
||||
resp = client.post(
|
||||
url_for('v2_notifications.post_notification', notification_type='letter'),
|
||||
@@ -160,7 +156,7 @@ def test_post_letter_notification_returns_403_if_not_allowed_to_send_notificatio
|
||||
}
|
||||
|
||||
error_json = letter_request(client, data, service_id=service.id, _expected_status=400)
|
||||
assert error_json['status_code'] == 403
|
||||
assert error_json['status_code'] == 400
|
||||
assert error_json['errors'] == [
|
||||
{'error': 'BadRequestError', 'message': 'Cannot send letters'}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user