def METHOD_NAME():
    """create_user should create a new affiliate tracking record if an affiliate id was passed in the kwargs"""
    affiliate = AffiliateFactory.create()
    with transaction.atomic():
        user = User.objects.create_user(
            "username1",
            email="a@b.com",
            name="Jane Doe",
            password="asdfghjkl1",
            affiliate_id=affiliate.id,
        )
    affiliate_referral_action = user.affiliate_user_actions.first()
    assert affiliate_referral_action is not None
    assert affiliate_referral_action.affiliate == affiliate
    assert affiliate_referral_action.created_user == user