コード例 #1
0
	def test_price_too_high_with_string__correct_price(self):
		self.assertEquals(None, v.price_too_high('1246.78'))
コード例 #2
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')
コード例 #3
0
	def test_price_too_high_with_correct_price(self):
		self.assertEquals(None, v.price_too_high(1246.78))
コード例 #4
0
	def test_price_too_high_with_correct_price_many_decimals(self):
		self.assertEquals(None, v.price_too_high(1246.783894734903479387))
コード例 #5
0
	def test_price_too_high_with_string__correct_price_many_decimals(self):
		self.assertEquals(None, v.price_too_high('1246.7811111111111111'))
コード例 #6
0
 def test_price_too_high_with_string__correct_price(self):
     self.assertEquals(None, v.price_too_high('1246.78'))
コード例 #7
0
 def test_price_too_high_with_correct_price(self):
     self.assertEquals(None, v.price_too_high(1246.78))
コード例 #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')
コード例 #9
0
 def test_price_too_high_with_string__correct_price_many_decimals(self):
     self.assertEquals(None, v.price_too_high('1246.7811111111111111'))
コード例 #10
0
 def test_price_too_high_with_correct_price_many_decimals(self):
     self.assertEquals(None, v.price_too_high(1246.783894734903479387))