Created
February 24, 2019 17:59
-
-
Save mtz29/f6af1ec59cb862dde5559b1927572878 to your computer and use it in GitHub Desktop.
ribena test_transaction_1000_pln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_transaction_1000_pln(self): | |
user = get_user_model().objects.get(username="user1") # user has id = 2 | |
Transaction.objects.create(date=timezone.now(), | |
value=1000, | |
t_id=1, | |
u_id="123456") | |
print(Star.objects.all()) | |
# test points | |
assert user.profile.points == 75 | |
# test stars | |
assert Star.objects.filter(sid="1001", active=True, value=0, user=2).first() != None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment