Change config structure so allowances are dated

We’re going to have different allowances next financial year. This means
that when someone adds a service, we’ll need to check which year it is,
so we can give them the right allowance.

This commit changes the config structure so that the current allowances
are explicitly assigned to the 2020/21 financial year.

It freezes the tests to the 2020/21 financial year, so they won’t start
failing automatically when next financial year comes around.
This commit is contained in:
Chris Hill-Scott
2021-03-08 14:25:26 +00:00
parent f5772328a1
commit bac54462db
3 changed files with 53 additions and 18 deletions
+24 -8
View File
@@ -33,14 +33,30 @@ class Config(object):
AWS_REGION = 'eu-west-1'
DEFAULT_SERVICE_LIMIT = 50
DEFAULT_FREE_SMS_FRAGMENT_LIMITS = {
'central': 250000,
'local': 25000,
'nhs_central': 250000,
'nhs_local': 25000,
'nhs_gp': 25000,
'emergency_service': 25000,
'school_or_college': 25000,
'other': 25000,
'central': {
2020: 250000,
},
'local': {
2020: 25000,
},
'nhs_central': {
2020: 250000,
},
'nhs_local': {
2020: 25000,
},
'nhs_gp': {
2020: 25000,
},
'emergency_service': {
2020: 25000,
},
'school_or_college': {
2020: 25000,
},
'other': {
2020: 25000,
},
}
EMAIL_EXPIRY_SECONDS = 3600 # 1 hour
INVITATION_EXPIRY_SECONDS = 3600 * 24 * 2 # 2 days - also set on api