Skip to content

Commit

Permalink
Merge pull request #1612 from tseaver/logging-system_test-metric_reload
Browse files Browse the repository at this point in the history
Add system test for 'Metric.reload'.
  • Loading branch information
tseaver committed Mar 18, 2016
2 parents 4d21791 + e0492bd commit 4b88a63
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions system_tests/logging_.py
Expand Up @@ -94,3 +94,15 @@ def test_list_metrics(self):
after_names = set(metric.name for metric in after_metrics)
self.assertEqual(after_names - before_names,
set([DEFAULT_METRIC_NAME]))

def test_reload_metric(self):
metric = Config.CLIENT.metric(
DEFAULT_METRIC_NAME, DEFAULT_FILTER, DEFAULT_DESCRIPTION)
self.assertFalse(metric.exists())
metric.create()
self.to_delete.append(metric)
metric.filter_ = 'logName:other'
metric.description = 'local changes'
metric.reload()
self.assertEqual(metric.filter_, DEFAULT_FILTER)
self.assertEqual(metric.description, DEFAULT_DESCRIPTION)

0 comments on commit 4b88a63

Please sign in to comment.