def test_formula_set_params(self):
        f = Formula()

        f({'a': 2, 'b': 5})

        self.assertEqual(f('a'), 2)
        self.assertEqual(f.get_param('b'), 5)
    def test_calc(self):
        f = Formula()
        calc = Calc(f)

        @f(1)
        def a(b, c):
            return b + c

        @f(2)
        def b(c):
            return c * 2

        f({'c': 4})

        calc('a')

        self.assertEqual(f('a'), 12)
        self.assertEqual(f.get_param('b'), 8)