<s> from django . conf import settings <EOL> from django . test import TestCase <EOL> from django . contrib . sites . models import Site <EOL> from django . core . urlresolvers import reverse <EOL> from la_facebook . access import OAuthAccess <EOL> from la_facebook . utils . loader import load_path_attr <EOL> class PropertyTests ( TestCase ) : <EOL> def test_key_in_settings ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> self . assertEquals ( oauth . key , "<STR_LIT>" ) <EOL> def test_secret_in_settings ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> self . assertEquals ( oauth . secret , "<STR_LIT>" ) <EOL> def test_access_token_url ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> access_token_endpoint = oauth . access_token_url <EOL> expected_endpoints_url = "<STR_LIT>" <EOL> self . assertEquals ( access_token_endpoint , expected_endpoints_url ) <EOL> def test_authorize_url ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> authorize_url_endpoint = oauth . authorize_url <EOL> expected_endpoint_url = "<STR_LIT>" <EOL> self . assertEquals ( authorize_url_endpoint , expected_endpoint_url ) <EOL> def test_provider_scope ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> provider_scope_endpoint = oauth . provider_scope <EOL> expected_endpoint_url = None <EOL> self . assertEquals ( provider_scope_endpoint , expected_endpoint_url ) <EOL> def test_callback_url ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> callback_url = oauth . callback_url <EOL> current_site = Site . objects . get ( pk = settings . SITE_ID ) <EOL> base_url = "<STR_LIT>" % current_site . domain <EOL> reversed_url = reverse ( "<STR_LIT>" ) <EOL> expected_url = "<STR_LIT>" % ( base_url , reversed_url ) <EOL> self . assertEquals ( callback_url , expected_url ) <EOL> def test_callback ( self ) : <EOL> oauth = OAuthAccess ( ) <EOL> callback_endpoint = oauth . callback <EOL> expected_callback_endpoint = load_path_attr ( settings . FACEBOOK_ACCESS_SETTINGS [ "<STR_LIT>" ] ) <EOL> self . assertEquals ( callback_endpoint , expected_callback_endpoint ) </s>
