Commit Graph

14 Commits

Author SHA1 Message Date
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
Leo Hemsted
8d160303a1 add transactional wrapper
and add case to get_notification_table_to_use test
2019-12-04 15:26:26 +00:00
Leo Hemsted
208abfc722 remove unused function 2019-06-04 11:33:19 +01:00
Leo Hemsted
f29e08c778 don't update current year twice 2017-12-06 14:45:44 +00:00
Leo Hemsted
78099de776 make sure POST /free-sms-fragment-limit always creates
refactored billing/rest.py and annual_billing_dao.py to remove logic
from the dao, and simplify the process around creating new rows. Make
sure that the POST always creates (it previously wouldn't create rows
for years that don't already exist). Clean up some tests that were
doing too much set-up/data verification via rest calls rather than
directly inserting test data in to the DB.
2017-12-06 14:45:44 +00:00
Leo Hemsted
b0d4044ff5 remove free_sms_fragment_limit from service
* remove from model
* still required when calling POST /service - we just call through
  from dao_create_service to add a new annual billing entry.
* removed from POST /service/<id> update_service - if you want to
  update/add a new one, use POST /service/<id>/free-sms-fragment-limit
* made sure tests create services with default 250k limit.
2017-12-06 14:45:43 +00:00
Leo Hemsted
28088428f1 flake8 - misc flake8 errs.
* unused variables
* variables in loops overshadowing imports
* excepts with no defined exc type (tried to avoid `except Exception` too)
* history mapper is still too complex
* default variables should never be mutable
2017-11-28 14:28:01 +00:00
venusbb
ad386b7d28 removed unused import and minor syntax 2017-11-02 17:02:00 +00:00
venusbb
6f7793d761 - Add update dao_update_annual_billing_for_current_and_future_years
- moved get_current_financial_year_start_year from service.utils to dao.date_utils
- Moved logic for data persistence from rest to dao when updating records in db
2017-11-02 12:38:43 +00:00
venusbb
9aa7489655 incorporate reviewers comments 2017-10-26 11:49:56 +01:00
venusbb
e8f659837a remove unused codes 2017-10-25 14:52:35 +01:00
venusbb
8ad98f2806 create entry when creating a new service 2017-10-25 11:35:13 +01:00
venusbb
15e3b4171b fixed object persistence problem 2017-10-24 16:10:51 +01:00
venusbb
59dd343254 Added free_sms_fragment_limit model, schema, dao and Rest 2017-10-24 13:23:24 +01:00