def test_OfferPositive(self): formulario = OfferForm(user=None, data={ 'name': "testOfferName", 'description': "this is a description", 'offeredAmount': 10.0, 'date': "10/3/2019" }) self.assertTrue(formulario.is_valid())
def test_OfferNegativeInvalidDate(self): formulario1 = OfferForm(user=None, data={ 'name': "testOfferName", 'description': "this is a description", 'offeredAmount': 10.0, 'date': "ivewvoinewve" }) self.assertFalse(formulario1.is_valid())
def test_OfferNegativeNoneAmount(self): formulario1 = OfferForm(user=None, data={ 'name': "testOfferName", 'description': "this is a description", 'offeredAmount': None, 'date': "10/3/2019" }) self.assertFalse(formulario1.is_valid())