コード例 #1
0
    def test_aggregate(self):
        md = {}
        with self.assertRaises(ModelError):
            measure = create_measure_aggregate(md)

        measure = create_measure_aggregate("amount_sum")
        self.assertIsInstance(measure, MeasureAggregate)
        self.assertEqual("amount_sum", measure.name)
コード例 #2
0
ファイル: test_model.py プロジェクト: 6si/cubes
    def test_aggregate(self):
        md = {}
        with self.assertRaises(ModelError):
            measure = create_measure_aggregate(md)

        measure = create_measure_aggregate("amount_sum")
        self.assertIsInstance(measure, MeasureAggregate)
        self.assertEqual("amount_sum", measure.name)
コード例 #3
0
    def test_fact_count(self):
        md = {"name": "count", "function": "count"}
        agg = create_measure_aggregate(md)

        self.assertEqual("count", agg.name)
        self.assertIsNone(agg.measure)
        self.assertEqual("count", agg.function)
        self.assertIsNone(agg.formula)
コード例 #4
0
ファイル: test_model.py プロジェクト: 6si/cubes
    def test_fact_count(self):
        md = {"name": "count", "function": "count"}
        agg = create_measure_aggregate(md)

        self.assertEqual("count", agg.name)
        self.assertIsNone(agg.measure)
        self.assertEqual("count", agg.function)
        self.assertIsNone(agg.formula)