-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignore zero value usages #648
Conversation
@@ -1264,6 +1300,7 @@ def test_pricing_service_usage_api_endpoint_with_filtering_by_service(self): # | |||
self.assertEquals(resp.status_code, 200) | |||
received_response = json.loads(resp.content) | |||
usages = received_response['usages'] | |||
usages.sort() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing randomly - sorting usages fixes it.
) | ||
daily_usages.append(daily_usage) | ||
usages_daily_pricing_objects[usage_type].append( | ||
daily_pricing_object | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this line be indented by 4 more spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should
…y usages When pricing service has multiple services (for distributing cost) and not every DailyUsage is present (see #648 - ignoring zero-value usage) costs were not distributed properly. It was caused by storying usage values for single service environment on lists - these lists have different size and when accessing by index (and using `zip` to join this list with total usage and percentage for usage type) usage value was combined with wrong total usage and percentage.
…y usages (#652) When pricing service has multiple services (for distributing cost) and not every DailyUsage is present (see #648 - ignoring zero-value usage) costs were not distributed properly. It was caused by storying usage values for single service environment on lists - these lists have different size and when accessing by index (and using `zip` to join this list with total usage and percentage for usage type) usage value was combined with wrong total usage and percentage.
No description provided.