clean up usage of dates/datetimes in performance platform tasks

* call variables unambiguous things like `start_time` or `bst_date` to
  reduce risk of passing in the wrong thing
* simplify the count_dict object - remove nested dict and start_date
  fields as superfluous
* use static datetime objects in tests rather than calculating them
  each time
This commit is contained in:
Leo Hemsted
2019-04-02 11:49:20 +01:00
parent 4abbb7137a
commit 3739d9055d
7 changed files with 64 additions and 79 deletions

View File

@@ -29,7 +29,7 @@ def test_send_processing_time_to_performance_platform_creates_correct_call_to_pe
send_stats = mocker.patch('app.performance_platform.total_sent_notifications.performance_platform_client.send_stats_to_performance_platform') # noqa
send_processing_time_data(
date=datetime(2016, 10, 15, 23, 0, 0),
start_time=datetime(2016, 10, 15, 23, 0, 0),
status='foo',
count=142
)