Beispiel #1
0
 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())
Beispiel #2
0
 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())
Beispiel #3
0
 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())