Skip to content
Browse files

Added some basic tests

git-svn-id: https://django-voting.googlecode.com/svn/trunk@50 662f01ad-f42a-0410-a340-718c64ddaef4
  • Loading branch information...
1 parent 0e60709 commit 4df7a0370a9b42d6a8f5070c6029209ec693bcb4 @insin insin committed May 16, 2007
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/tests.py
View
4 tests/tests.py
@@ -41,7 +41,7 @@
>>> Vote.objects.record_vote(i1, user, -2)
Traceback (most recent call last):
...
-ValueError: ['Invalid vote (must be +1/0/-1)']
+ValueError: Invalid vote (must be +1/0/-1)
# Retrieval of votes #########################################################
@@ -64,5 +64,7 @@
>>> votes = Vote.objects.get_for_user_in_bulk([i1, i2, i3, i4], users[0])
>>> [(id, vote.vote) for id, vote in votes.items()]
[(1, -1), (2, 1), (3, -1)]
+>>> Vote.objects.get_for_user_in_bulk([], users[0])
+{}
"""

0 comments on commit 4df7a03

Please sign in to comment.
Something went wrong with that request. Please try again.