Exemple #1
0
 def test_history_deposit(self):
     user = G(User)
     G(WalletTransaction,
       user=user,
       is_withdrawl=False,
       is_deposit=True,
       amount=Decimal(100))
     result = tasks.build_history(user)
     self.assertEqual(result, "Deposited 100.00 doges \n")
Exemple #2
0
 def test_history_tip_recieved(self):
     user = G(User, user_name="Tipper")
     receiver = G(User, user_name="receiver")
     G(Transaction,
       from_user=user,
       to_user=receiver,
       amount=Decimal(10))
     result = tasks.build_history(user)
     self.assertEqual(result, "Tipped receiver 10.00 doges \n")
Exemple #3
0
 def test_history_tip_pending(self, mock_soundcloud):
     mock_soundcloud.return_value.get_soundcloud_user.return_value = {'username': '******'}
     user = G(User, user_name="Tipper")
     receiver = None
     G(Transaction,
       from_user=user,
       to_user=receiver,
       amount=Decimal(10))
     result = tasks.build_history(user)
     self.assertEqual(result, "Pending tip to test of 10.00 \n")