Пример #1
0
 def test_3_decimales(self):
     form_data = {'porcentaje': '1.234'}
     form = PorcentajeForm(data=form_data)
     self.assertFalse(form.is_valid())
Пример #2
0
 def test_letras(self):
     form_data = {'porcentaje': 'A'}
     form = PorcentajeForm(data=form_data)
     self.assertFalse(form.is_valid())
Пример #3
0
 def test_vacio(self):
     form_data = {}
     form = PorcentajeForm(data=form_data)
     self.assertFalse(form.is_valid())
Пример #4
0
 def test_mas_de_9(self):
     form_data = {'porcentaje': '10.0'}
     form = PorcentajeForm(data=form_data)
     self.assertFalse(form.is_valid())
Пример #5
0
 def test_0_sin_decimales(self):
     form_data = {'porcentaje': '0'}
     form = PorcentajeForm(data=form_data)
     self.assertTrue(form.is_valid())
Пример #6
0
	def test_3_decimales(self):
		form_data = {'porcentaje': '1.234'}
		form = PorcentajeForm(data = form_data)
		self.assertFalse(form.is_valid())
Пример #7
0
 def test_9(self):
     form_data = {'porcentaje': '9.9'}
     form = PorcentajeForm(data=form_data)
     self.assertTrue(form.is_valid())
Пример #8
0
	def test_vacio(self):
		form_data = {}
		form = PorcentajeForm(data = form_data)
		self.assertFalse(form.is_valid())
Пример #9
0
	def test_letras(self):
		form_data = {'porcentaje': 'A'}
		form = PorcentajeForm(data = form_data)
		self.assertFalse(form.is_valid())
Пример #10
0
	def test_0_sin_decimales(self):
		form_data = {'porcentaje': '0'}
		form = PorcentajeForm(data = form_data)
		self.assertTrue(form.is_valid())
Пример #11
0
	def test_mas_de_9(self):
		form_data = {'porcentaje': '10.0'}
		form = PorcentajeForm(data = form_data)
		self.assertFalse(form.is_valid())
Пример #12
0
	def test_9(self):
		form_data = {'porcentaje': '9.9'}
		form = PorcentajeForm(data = form_data)
		self.assertTrue(form.is_valid())