counts.py: Change check for LoggingCountStat to use isinstance.

I think this is more pythonic?

We could also get rid of LoggingCountStats altogether, since it's now just a
special case of CountStat (is_logging == data_collector.pull_function is None).
But I think it's nice to keep the distinction since they behave so differently.
This commit is contained in:
Rishi Gupta
2017-04-04 11:40:22 -07:00
committed by Tim Abbott
parent b45185562a
commit 6dff22cbaf
2 changed files with 3 additions and 5 deletions

View File

@@ -197,7 +197,7 @@ class TestProcessCountStat(AnalyticsTestCase):
self.assertFillStateEquals(current_time)
self.assertEqual(InstallationCount.objects.filter(property=property).count(), 2)
# This tests the is_logging branch of the code in do_delete_counts_at_hour.
# This tests the LoggingCountStat branch of the code in do_delete_counts_at_hour.
# It is important that do_delete_counts_at_hour not delete any of the collected
# logging data!
def test_process_logging_stat(self):