示例#1
0
	def testconvertAmountToChips(self):                          
		""" Chips amount must be equal or less than min value"""		        
		for m in MONEYS:
			result = money.convertAmountToChips( m['amount'] )				
			self.assertTrue( abs( m['amount'] - money.convertChipsToAmount( result ) ) <  m['min'] )
示例#2
0
	def testretrieveAmountFromChips(self):  
		for m in MONEYS:
			for a in AMOUNTS:
				result = money.retrieveAmountFromChips( a, dict(m['chips']) )	
				self.assertTrue( abs( a - int(money.convertChipsToAmount( result )) ) <  m['min'] )
示例#3
0
	def testconvertChipsToAmount(self):                          
		"""Chips amount must be equal to the real amount"""
		for m in MONEYS:	              
			result = money.convertChipsToAmount( m['chips'] )			
			self.assertTrue( abs( m['amount'] - result ) <  m['min'] )