コード例 #1
0
ファイル: metric_base_tests.py プロジェクト: msabramo/tally
    def setUp(self):

        from tally.metric.base import Metric

        self.mock_storage = MagicMock()

        self.metric = Metric("KEY", storage=self.mock_storage)
コード例 #2
0
ファイル: metric_base_tests.py プロジェクト: msabramo/tally
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())