Module Expr Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad Call AttributeLoad NameLoad attr Num Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad Call AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Str decorator_list decorator_list
N/A N/A 
tests.test_model
~~~~~~~~~~~~~~~~

Tests the models provided by the updown rating app

:copyright: 2016, weluse (https://weluse.de)
:author: 2016, Daniel Banck <dbanck@weluse.de>
:license: BSD, see LICENSE for more details.
 __future__ unicode_literals N/A random django.test TestCase django.contrib.auth.models User updown.models SCORE_TYPES updown.exceptions CannotChangeVote tests.models RatingTestModel TestRatingModel N/A TestCase N/A N/A Test case for the generic rating app setUp N/A N/A self N/A N/A N/A N/A self instance N/A N/A N/A RatingTestModel objects create N/A N/A self user N/A N/A N/A User objects create username N/A str N/A N/A random randint 0 100000000 N/A N/A self user2 N/A N/A N/A User objects create username N/A str N/A N/A random randint 0 100000000 N/A test_basic_vote N/A N/A self N/A N/A N/A Test a simple vote N/A N/A N/A N/A N/A self instance rating add N/A SCORE_TYPES N/A LIKE N/A self user 192.168.0.1 N/A N/A N/A self assertEquals N/A N/A self instance rating_likes 1 N/A test_change_vote N/A N/A self N/A N/A N/A N/A N/A N/A N/A self instance rating add N/A SCORE_TYPES N/A LIKE N/A self user 192.168.0.1 N/A N/A N/A N/A N/A self instance rating add N/A SCORE_TYPES N/A DISLIKE N/A self user 192.168.0.1 N/A N/A N/A self assertEquals N/A N/A self instance rating_likes 0 N/A N/A N/A self assertEquals N/A N/A self instance rating_dislikes 1 N/A test_change_vote_disallowed N/A N/A self N/A N/A N/A N/A N/A N/A N/A self instance rating2 add N/A SCORE_TYPES N/A LIKE N/A self user 192.168.0.1 N/A N/A N/A self assertRaises CannotChangeVote N/A N/A N/A self instance rating2 add N/A SCORE_TYPES N/A DISLIKE N/A self user 192.168.0.1 N/A N/A