def test_validation_withou_last_bid(self):
        self._setup_user()
        self._setup_product()

        form = BidModelForm({'product': '1', 'user': '******', 'value': '1510'})

        self.assertTrue(form.is_valid())
 def test_max_value_validation(self):
     self._setup_bid(value=Decimal('1500'))
     form = BidModelForm({
         'product': '1',
         'user':'******',
         'value': '1500000'
     })
     self.assertFalse(form.is_valid())
    def test_validation_withou_last_bid(self):
        self._setup_user()
        self._setup_product()

        form = BidModelForm({
            'product': '1',
            'user':'******',
            'value': '1510'
        })

        self.assertTrue(form.is_valid())
    def test_min_value_validation(self):

        self._setup_bid(value=Decimal('1500'))
        form = BidModelForm({'product': '1', 'user': '******', 'value': '1500'})
        self.assertFalse(form.is_valid())