Ejemplo n.º 1
0
    def setUp(self):

        from tally.metric.base import Metric

        self.mock_storage = MagicMock()

        self.metric = Metric("KEY", storage=self.mock_storage)
Ejemplo n.º 2
0
class BaseMetricTestCase(TestCase):

    def setUp(self):

        from tally.metric.base import Metric

        self.mock_storage = MagicMock()

        self.metric = Metric("KEY", storage=self.mock_storage)

    def test_metric_init(self):

        from tally.exceptions import UnimplementedException

        with self.assertRaises(UnimplementedException):
            list(self.metric.timestamps())