def test_recalc(self):
     f = self.create_field()
     bf = BoundField(f , StubModel())
     self.assertEquals(True, bf.recalc() )
     self.assertEquals(Decimal("123"), bf.value)
     bf.set_value("101")
     self.assertEquals(False, bf.recalc() )
     self.assertEquals(Decimal("101"), bf.value)
 def test_recalc(self):
     f = self.create_field()
     bf = BoundField(f, StubModel())
     self.assertEquals(True, bf.recalc())
     self.assertEquals(Decimal("123"), bf.value)
     bf.set_value("101")
     self.assertEquals(False, bf.recalc())
     self.assertEquals(Decimal("101"), bf.value)
 def test_recalc_when_calc_method_is_none(self):
     f = Field(name="f1",  datatype=Decimal )
     bf = BoundField(f , StubModel())
     self.assertEquals(False, bf.recalc() )
     self.assertEquals(None, bf.value)
 def test_recalc_when_calc_method_is_none(self):
     f = Field(name="f1", datatype=Decimal)
     bf = BoundField(f, StubModel())
     self.assertEquals(False, bf.recalc())
     self.assertEquals(None, bf.value)