'Verify that a referral attribution is recorded if an affiliate
cookie is present upon a new user\'s registration.'

@unittest.skipUnless((settings.ROOT_URLCONF == 'lms.urls'), 'Test    only    valid    in    lms')
def test_affiliate_referral_attribution(self):

    affiliate_id = 'test-partner'
    self.client.cookies[settings.AFFILIATE_COOKIE_NAME] = affiliate_id
    user = self.create_account_and_fetch_profile().user
    self.assertEqual(UserAttribute.get_user_attribute(user, REGISTRATION_AFFILIATE_ID), affiliate_id)
