Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Dict Str Str Str Str Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Num NameLoad AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Num NameLoad Str Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Dict Str Str Str Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str NameLoad AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str ListLoad Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad keyword Dict Assign NameStore Call NameLoad keyword Dict Str Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict decorator_list Call NameLoad Str keyword Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Dict Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str ListLoad Str decorator_list decorator_list
N/A N/A 
.. module:: dj-stripe.tests.test_contrib.test_serializers
    :synopsis: dj-stripe Serializer Tests.

.. moduleauthor:: Philippe Luickx (@philippeluickx)

 __future__ unicode_literals decimal Decimal django.test TestCase django.utils timezone django.conf settings mock patch PropertyMock djstripe.contrib.rest_framework.serializers SubscriptionSerializer CreateSubscriptionSerializer djstripe.models CurrentSubscription SubscriptionSerializerTest N/A TestCase N/A test_valid_serializer N/A N/A self N/A N/A N/A now N/A N/A timezone now N/A serializer N/A SubscriptionSerializer data N/A plan quantity start status amount N/A N/A N/A settings DJSTRIPE_PLANS N/A test0 N/A plan 2 now N/A CurrentSubscription STATUS_ACTIVE N/A N/A N/A settings DJSTRIPE_PLANS N/A test0 N/A price N/A N/A N/A self assertTrue N/A N/A serializer is_valid N/A N/A N/A self assertEqual N/A serializer validated_data N/A plan quantity start status amount test0 2 now active N/A Decimal 1000 N/A N/A N/A self assertEqual N/A serializer errors N/A N/A test_invalid_serializer N/A N/A self N/A N/A N/A now N/A N/A timezone now N/A serializer N/A SubscriptionSerializer data N/A plan start status amount N/A N/A N/A settings DJSTRIPE_PLANS N/A test0 N/A plan now N/A CurrentSubscription STATUS_ACTIVE N/A N/A N/A settings DJSTRIPE_PLANS N/A test0 N/A price N/A N/A N/A self assertFalse N/A N/A serializer is_valid N/A N/A N/A self assertEqual N/A serializer validated_data N/A N/A N/A N/A self assertEqual N/A serializer errors N/A quantity N/A This field is required. N/A N/A CreateSubscriptionSerializerTest N/A TestCase N/A test_valid_serializer N/A N/A self stripe_token_mock N/A N/A N/A token N/A stripe_token_mock card N/A N/A serializer N/A CreateSubscriptionSerializer data N/A plan stripe_token N/A N/A N/A settings DJSTRIPE_PLANS N/A test0 N/A plan N/A token id N/A N/A N/A self assertTrue N/A N/A serializer is_valid N/A N/A N/A self assertEqual N/A N/A serializer validated_data N/A plan test0 N/A N/A N/A self assertIn stripe_token N/A serializer validated_data N/A N/A N/A self assertEqual N/A serializer errors N/A N/A N/A patch stripe.Token.create return_value N/A PropertyMock id token_test test_invalid_serializer N/A N/A self N/A N/A N/A serializer N/A CreateSubscriptionSerializer data N/A plan N/A N/A N/A settings DJSTRIPE_PLANS N/A test0 N/A plan N/A N/A N/A self assertFalse N/A N/A serializer is_valid N/A N/A N/A self assertEqual N/A serializer validated_data N/A N/A N/A N/A self assertEqual N/A serializer errors N/A stripe_token N/A This field is required. N/A N/A