Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
We do not post when no data
Browse files Browse the repository at this point in the history
make more explicit that if the entire history of a metric is null then
we do not post a record to the latest data dataset.
  • Loading branch information
jcbashdown committed Jan 30, 2015
1 parent 9a0a2cc commit c37e5c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"digital_takeup": 0.965537995968002,
"end_at": "2012-04-01T00:00:00+00:00",
"number_of_digital_transactions": 2184914,
"number_of_transactions": 2262898,
"number_of_transactions": null,
"period": "year",
"service_id": "sorn-innit",
"total_cost": 11767069.6,
Expand All @@ -92,7 +92,7 @@
"digital_takeup": 0.9756123825537215,
"end_at": "2013-01-01T00:00:00+00:00",
"number_of_digital_transactions": 2301214,
"number_of_transactions": 2358738,
"number_of_transactions": null,
"period": "year",
"service_id": "sorn-innit",
"total_cost": 6203480.9399999995,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,6 @@
"dashboard_slug": "sorn",
"type": "seasonally-adjusted"
},
{
"_id": encode_id('sorn', 'number_of_transactions'),
"_timestamp": "2013-04-01T00:00:00+00:00",
"end_at": "2012-04-01T00:00:00+00:00",
"number_of_transactions": 2262898,
"period": "year",
"service_id": "sorn-innit",
"dashboard_slug": "sorn",
"type": "seasonally-adjusted"
},
{
"_id": encode_id('sorn', 'total_cost'),
"_timestamp": "2013-04-01T00:00:00+00:00",
Expand Down Expand Up @@ -182,7 +172,7 @@ def test_compute(self, mock_dashboard_finder, mock_dataset):
'data-group': 'transactions-explorer',
'data-type': 'spreadsheet'}})

assert_that(len(transformed_data), is_(12))
assert_that(len(transformed_data), is_(11))
assert_that(transformed_data, contains_inanyorder(*data_to_post))

@patch("performanceplatform.client.DataSet.from_group_and_type")
Expand Down

0 comments on commit c37e5c5

Please sign in to comment.