Exemplo n.º 1
0
Arquivo: tests.py Projeto: msuess/web
 def test_parse_comment_amount_decimal(self):
     """Test parse_comment_amount can retrieve amount when it includes decimals."""
     amount = parse_comment_amount("@gitcoinbot bounty 2.34 ETH")
     self.assertEqual(amount, "2.34")
     amount = parse_comment_amount("@gitcoinbot bounty .23 ETH")
     self.assertEqual(amount, ".23")
     amount = parse_comment_amount("@gitcoinbot bounty 1.333334 ETH")
     self.assertEqual(amount, "1.333334")
Exemplo n.º 2
0
 def test_parse_comment_amount_decimal(self):
     """Test parse_comment_amount can retrieve amount when it includes decimals."""
     amount = parse_comment_amount('@gitcoinbot bounty 2.34 ETH')
     self.assertEqual(amount, '2.34')
     amount = parse_comment_amount('@gitcoinbot bounty .23 ETH')
     self.assertEqual(amount, '.23')
     amount = parse_comment_amount('@gitcoinbot bounty 1.333334 ETH')
     self.assertEqual(amount, '1.333334')
Exemplo n.º 3
0
Arquivo: tests.py Projeto: msuess/web
 def test_parse_comment_amount(self):
     """Test parse_comment_amount can retrieve amount when they're whole numbers."""
     amount = parse_comment_amount("@gitcoinbot bounty 234 ETH")
     self.assertEqual(amount, "234")
     amount2 = parse_comment_amount("@gitcoinbot bounty 1 ETH")
     self.assertEqual(amount2, "1")
     amount3 = parse_comment_amount("@gitcoinbot bounty 1741852963 ETH")
     self.assertEqual(amount3, "1741852963")
Exemplo n.º 4
0
 def test_parse_comment_amount(self):
     """Test parse_comment_amount can retrieve amount when they're whole numbers."""
     amount = parse_comment_amount('@gitcoinbot bounty 234 ETH')
     self.assertEqual(amount, '234')
     amount2 = parse_comment_amount('@gitcoinbot bounty 1 ETH')
     self.assertEqual(amount2, '1')
     amount3 = parse_comment_amount('@gitcoinbot bounty 1741852963 ETH')
     self.assertEqual(amount3, '1741852963')
Exemplo n.º 5
0
Arquivo: tests.py Projeto: msuess/web
 def test_parse_comment_amount_spaces(self):
     """Test parse_comment_amount returns first instance of amount."""
     amount = parse_comment_amount("@gitcoinbot bounty 2.2 34 ETH")
     self.assertEqual(amount, "2.2")