remove dvla_organisation

it's been superceeded by letter branding
This commit is contained in:
Leo Hemsted
2019-02-12 17:26:21 +00:00
parent 5037293724
commit 53ecaa3230
10 changed files with 0 additions and 69 deletions

View File

@@ -45,7 +45,6 @@ from app.models import (
InvitedUser,
Service,
ServicePermission,
DVLA_ORG_HM_GOVERNMENT,
KEY_TYPE_NORMAL,
KEY_TYPE_TEAM,
KEY_TYPE_TEST,
@@ -89,7 +88,6 @@ def test_create_service(notify_db_session):
service_db = Service.query.one()
assert service_db.name == "service_name"
assert service_db.id == service.id
assert service_db.dvla_organisation_id == DVLA_ORG_HM_GOVERNMENT
assert service_db.email_from == 'email_from'
assert service_db.research_mode is False
assert service_db.prefix_sms is True
@@ -370,8 +368,6 @@ def test_create_service_creates_a_history_record_with_current_data(notify_db_ses
assert service_from_db.version == service_history.version
assert user.id == service_history.created_by_id
assert service_from_db.created_by.id == service_history.created_by_id
assert service_from_db.dvla_organisation_id == DVLA_ORG_HM_GOVERNMENT
assert service_history.dvla_organisation_id == DVLA_ORG_HM_GOVERNMENT
def test_update_service_creates_a_history_record_with_current_data(notify_db_session):

View File

@@ -1,14 +0,0 @@
from flask import json
from tests import create_authorization_header
def test_get_dvla_organisations(client):
auth_header = create_authorization_header()
response = client.get('/dvla_organisations', headers=[auth_header])
assert response.status_code == 200
dvla_organisations = json.loads(response.get_data(as_text=True))
assert dvla_organisations['001'] == 'HM Government'
assert dvla_organisations['500'] == 'Land Registry'

View File

@@ -23,7 +23,6 @@ from app.models import (
ServicePermission,
ServiceSmsSender,
User,
DVLA_ORG_LAND_REGISTRY,
KEY_TYPE_NORMAL, KEY_TYPE_TEAM, KEY_TYPE_TEST,
EMAIL_TYPE, SMS_TYPE, LETTER_TYPE,
EDIT_FOLDERS, INTERNATIONAL_SMS_TYPE, INBOUND_SMS_TYPE,
@@ -139,7 +138,6 @@ def test_get_service_by_id(admin_request, sample_service):
assert not json_resp['data']['research_mode']
assert json_resp['data']['email_branding'] is None
assert 'branding' not in json_resp['data']
assert json_resp['data']['dvla_organisation'] == '001'
assert json_resp['data']['prefix_sms'] is True
assert json_resp['data']['letter_logo_filename'] is None
@@ -235,7 +233,6 @@ def test_create_service(admin_request, sample_user):
assert json_resp['data']['name'] == 'created service'
assert json_resp['data']['email_from'] == 'created.service'
assert not json_resp['data']['research_mode']
assert json_resp['data']['dvla_organisation'] == '001'
assert json_resp['data']['rate_limit'] == 3000
assert json_resp['data']['letter_branding'] is None
@@ -271,7 +268,6 @@ def test_create_service_with_domain_sets_letter_branding(admin_request, sample_u
'service_domain': letter_branding.domain
}
json_resp = admin_request.post('service.create_service', _data=data, _expected_status=201)
assert json_resp['data']['dvla_organisation'] == '001'
assert json_resp['data']['letter_branding'] == str(letter_branding.id)
assert json_resp['data']['letter_logo_filename'] == str(letter_branding.filename)
@@ -316,7 +312,6 @@ def test_get_service_by_id_returns_letter_branding(
json_resp = resp.json
assert json_resp['data']['name'] == sample_service.name
assert json_resp['data']['id'] == str(sample_service.id)
assert json_resp['data']['dvla_organisation'] == '001'
assert json_resp['data']['letter_branding'] == str(letter_branding.id)
assert json_resp['data']['letter_logo_filename'] == 'test-domain'
@@ -478,7 +473,6 @@ def test_update_service(client, notify_db, sample_service):
'email_from': 'updated.service.name',
'created_by': str(sample_service.created_by.id),
'email_branding': str(brand.id),
'dvla_organisation': DVLA_ORG_LAND_REGISTRY,
'organisation_type': 'foo',
}
@@ -494,7 +488,6 @@ def test_update_service(client, notify_db, sample_service):
assert result['data']['name'] == 'updated service name'
assert result['data']['email_from'] == 'updated.service.name'
assert result['data']['email_branding'] == str(brand.id)
assert result['data']['dvla_organisation'] == DVLA_ORG_LAND_REGISTRY
assert result['data']['organisation_type'] == 'foo'