mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
refactor tests
re-order notification dao delete notifications test to move "fixtures" to the top of the file changed create_service_data_retention to take an ORM object, not an id. brings it in line with other db.py test functions
This commit is contained in:
@@ -97,10 +97,10 @@ def test_should_delete_inbound_sms_according_to_data_retention(notify_db_session
|
||||
|
||||
services = [short_retention_service, no_retention_service, long_retention_service]
|
||||
|
||||
create_service_data_retention(long_retention_service.id, notification_type='sms', days_of_retention=30)
|
||||
create_service_data_retention(short_retention_service.id, notification_type='sms', days_of_retention=3)
|
||||
create_service_data_retention(long_retention_service, notification_type='sms', days_of_retention=30)
|
||||
create_service_data_retention(short_retention_service, notification_type='sms', days_of_retention=3)
|
||||
# email retention doesn't affect anything
|
||||
create_service_data_retention(short_retention_service.id, notification_type='email', days_of_retention=4)
|
||||
create_service_data_retention(short_retention_service, notification_type='email', days_of_retention=4)
|
||||
|
||||
dates = [
|
||||
datetime(2017, 6, 4, 23, 00), # just before three days
|
||||
|
||||
Reference in New Issue
Block a user