

def test_link_customer_customer_updated(self):
    msg = {
        'created': 1346855599,
        'data': {
            'object': {
                'account_balance': 0,
                'active_card': {
                    'address_city': None,
                    'address_country': None,
                    'address_line1': None,
                    'address_line1_check': None,
                    'address_line2': None,
                    'address_state': None,
                    'address_zip': None,
                    'address_zip_check': None,
                    'country': 'MX',
                    'cvc_check': 'pass',
                    'exp_month': 1,
                    'exp_year': 2014,
                    'fingerprint': 'XXXXXXXXXXX',
                    'last4': '7992',
                    'name': None,
                    'object': 'card',
                    'type': 'MasterCard',
                },
                'created': 1346855596,
                'delinquent': False,
                'description': None,
                'discount': None,
                'email': 'xxxxxxxxxx@yahoo.com',
                'id': 'cus_xxxxxxxxxxxxxxx',
                'livemode': True,
                'object': 'customer',
                'subscription': None,
            },
            'previous_attributes': {
                'active_card': None,
            },
        },
        'id': 'evt_xxxxxxxxxxxxx',
        'livemode': True,
        'object': 'event',
        'pending_webhooks': 1,
        'type': 'customer.updated',
    }
    event = Event.objects.create(stripe_id=msg['id'], kind='customer.updated', livemode=True, webhook_message=msg, validated_message=msg)
    customers.link_customer(event)
    self.assertEquals(event.customer, msg.customer)

dataset/ETHPy150Open pinax/pinax-stripe/pinax/stripe/tests/test_event.py TestEventMethods.test_link_customer_customer_updated/VarMisuse@261/450 `self`->`msg`