Skip to content

Commit

Permalink
fix int 0.0 python 3 test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhebrak committed Feb 22, 2015
1 parent 694b1e7 commit 7f6033d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion statsy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_aggregated_stats_for_the_period(category, start, end=None, aggregation_p

def get_aggregated_time(time_string, aggregate_by):
day, hours, minutes = time_string.split(':')
aggregated_minutes = (int(hours) * 60 + int(minutes)) / aggregate_by
aggregated_minutes = int(float(hours) * 60 + float(minutes)) / aggregate_by

day = ('0' + day)[-2:]
hours = ('0' + str(aggregated_minutes * aggregate_by / 60))[-2:]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

class LogTest(TestCase):
def test_log(self):
statsy.logger.info('INFO message')
statsy.logger.error('Error message')
statsy.logger.info('TEST info message')
statsy.logger.error('TEST error message')

0 comments on commit 7f6033d

Please sign in to comment.