def test_price_too_high_with_string__correct_price(self):
		self.assertEquals(None, v.price_too_high('1246.78'))
	def test_price_too_high_with_mix_with_letters(self):
		# self.assertRaisesMessage(ValidationError,_('This price seems too high. Please make sure it is correct.'), v.price_too_high, '123.7a')
		with self.assertRaises(ValidationError) as e:
			v.price_too_high('123.7a')
		exc  = e.exception
		self.assertEqual(exc.code, 'price_too_high')
	def test_price_too_high_with_correct_price(self):
		self.assertEquals(None, v.price_too_high(1246.78))
	def test_price_too_high_with_correct_price_many_decimals(self):
		self.assertEquals(None, v.price_too_high(1246.783894734903479387))
	def test_price_too_high_with_string__correct_price_many_decimals(self):
		self.assertEquals(None, v.price_too_high('1246.7811111111111111'))
Beispiel #6
0
 def test_price_too_high_with_string__correct_price(self):
     self.assertEquals(None, v.price_too_high('1246.78'))
Beispiel #7
0
 def test_price_too_high_with_correct_price(self):
     self.assertEquals(None, v.price_too_high(1246.78))
Beispiel #8
0
 def test_price_too_high_with_mix_with_letters(self):
     # self.assertRaisesMessage(ValidationError,_('This price seems too high. Please make sure it is correct.'), v.price_too_high, '123.7a')
     with self.assertRaises(ValidationError) as e:
         v.price_too_high('123.7a')
     exc = e.exception
     self.assertEqual(exc.code, 'price_too_high')
Beispiel #9
0
 def test_price_too_high_with_string__correct_price_many_decimals(self):
     self.assertEquals(None, v.price_too_high('1246.7811111111111111'))
Beispiel #10
0
 def test_price_too_high_with_correct_price_many_decimals(self):
     self.assertEquals(None, v.price_too_high(1246.783894734903479387))