Skip to content

Instantly share code, notes, and snippets.

@mtz29
Created February 24, 2019 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtz29/f6af1ec59cb862dde5559b1927572878 to your computer and use it in GitHub Desktop.
Save mtz29/f6af1ec59cb862dde5559b1927572878 to your computer and use it in GitHub Desktop.
ribena test_transaction_1000_pln
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