<s> import unittest <EOL> import flask <EOL> from flask_cas import CAS <EOL> class test_flask_cas ( unittest . TestCase ) : <EOL> def test_cas_constructor ( self ) : <EOL> self . app = flask . Flask ( __name__ ) <EOL> CAS ( self . app ) <EOL> self . app . secret_key = "<STR_LIT>" <EOL> self . app . testing = True <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT:root>' <EOL> with self . app . test_client ( ) as client : <EOL> response = client . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT> ) <EOL> self . assertEqual ( <EOL> response . headers [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' ) <EOL> def test_cas_constructor_with_url_prefix ( self ) : <EOL> self . app = flask . Flask ( __name__ ) <EOL> CAS ( self . app , '<STR_LIT>' ) <EOL> self . app . secret_key = "<STR_LIT>" <EOL> self . app . testing = True <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT:root>' <EOL> with self . app . test_client ( ) as client : <EOL> response = client . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT> ) <EOL> self . assertEqual ( <EOL> response . headers [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' ) <EOL> def test_cas_constructor_properties ( self ) : <EOL> self . app = flask . Flask ( __name__ ) <EOL> cas = CAS ( self . app ) <EOL> with self . app . test_request_context ( ) : <EOL> self . assertEqual ( <EOL> cas . username , <EOL> None ) <EOL> self . assertEqual ( <EOL> cas . token , <EOL> None ) <EOL> def test_cas_init_app ( self ) : <EOL> self . app = flask . Flask ( __name__ ) <EOL> cas = CAS ( ) <EOL> cas . init_app ( self . app ) <EOL> self . app . secret_key = "<STR_LIT>" <EOL> self . app . testing = True <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT:root>' <EOL> with self . app . test_client ( ) as client : <EOL> response = client . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT> ) <EOL> self . assertEqual ( <EOL> response . headers [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' ) <EOL> def test_cas_init_app_with_prefix_url ( self ) : <EOL> self . app = flask . Flask ( __name__ ) <EOL> cas = CAS ( ) <EOL> cas . init_app ( self . app , '<STR_LIT>' ) <EOL> self . app . secret_key = "<STR_LIT>" <EOL> self . app . testing = True <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> self . app . config [ '<STR_LIT>' ] = '<STR_LIT:root>' <EOL> with self . app . test_client ( ) as client : <EOL> response = client . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT> ) <EOL> self . assertEqual ( <EOL> response . headers [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' ) <EOL> def test_cas_init_app_properties ( self ) : <EOL> self . app = flask . Flask ( __name__ ) <EOL> cas = CAS ( ) <EOL> cas . init_app ( self . app ) <EOL> with self . app . test_request_context ( ) : <EOL> self . assertEqual ( <EOL> cas . username , <EOL> None ) <EOL> self . assertEqual ( <EOL> cas . token , <EOL> None ) </s>
