
    )Jf*                     X    d dl mZ d dlmZ d dlmZmZ ddlmZ  G d dee          Z	dS )	    )SocialAccount)OAuth2TestsMixin)MockedResponseTestCase   )GitHubProviderc                   (    e Zd Zej        Zd Zd ZdS )GitHubTestsc                 B    t          dd          t          dd          gS )N   a`  
        {
            "type":"User",
            "organizations_url":"https://api.github.com/users/pennersr/orgs",
            "gists_url":"https://api.github.com/users/pennersr/gists{/gist_id}",
            "received_events_url":"https://api.github.com/users/pennersr/received_events",
            "gravatar_id":"8639768262b8484f6a3380f8db2efa5b",
            "followers":16,
            "blog":"http://www.intenct.info",
            "avatar_url":"https://secure.gravatar.com/avatar/8639768262b8484f6a3380f8db2efa5b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
            "login":"pennersr",
            "created_at":"2010-02-10T12:50:51Z",
            "company":"IntenCT",
            "subscriptions_url":"https://api.github.com/users/pennersr/subscriptions",
            "public_repos":14,
            "hireable":false,
            "url":"https://api.github.com/users/pennersr",
            "public_gists":0,
            "starred_url":"https://api.github.com/users/pennersr/starred{/owner}{/repo}",
            "html_url":"https://github.com/pennersr",
            "location":"The Netherlands",
            "bio":null,
            "name":"Raymond Penners",
            "repos_url":"https://api.github.com/users/pennersr/repos",
            "followers_url":"https://api.github.com/users/pennersr/followers",
            "id":201022,
            "following":0,
            "email":"raymond.penners@intenct.nl",
            "events_url":"https://api.github.com/users/pennersr/events{/privacy}",
            "following_url":"https://api.github.com/users/pennersr/following"
        }z
            {
              "email": "octocat@github.com",
              "verified": true,
              "primary": true,
              "visibility": "public"
            }
            )r   )selfs    o/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/github/tests.pyget_mocked_responsezGitHubTests.get_mocked_response   s:    ! !D 
 
G.
 .	
    c                    t          dd          t          dd          g}|                     |           t          j                            d          }|                     |j                            d                     |                                }|                     |	                                           | 
                    |	                                d           | 
                    |j        j        d           d	S )
z6String conversion when GitHub responds with empty namer   z
        {
            "type": "User",
            "id": 201022,
            "login": "pennersr",
            "name": null
        }
        z
        [
          {
            "email": "octocat@github.com",
            "verified": true,
            "primary": true,
            "visibility": "public"
          }
        ]
        201022)uidnamepennersrzoctocat@github.comN)r   loginr   objectsgetassertIsNone
extra_dataget_provider_accountassertIsNotNoneto_strassertEqualuseremail)r   mockssocialaccountaccounts       r   test_account_name_nullz"GitHubTests.test_account_name_null<   s     
 
 	 
4 	

5%-11h1??-266v>>???4466W^^--...)):666+13GHHHHHr   N)__name__
__module____qualname__r   idprovider_idr   r$    r   r   r
   r
      s@         #K/
 /
 /
b"I "I "I "I "Ir   r
   N)
allauth.socialaccount.modelsr   allauth.socialaccount.testsr   allauth.testsr   r   providerr   r
   r*   r   r   <module>r/      s    6 6 6 6 6 6 8 8 8 8 8 8 2 2 2 2 2 2 2 2 $ $ $ $ $ $VI VI VI VI VI"H VI VI VI VI VIr   