<s> import unittest <EOL> from flask import Flask <EOL> from flask_raptor import init_app <EOL> class RaptorTestCase ( unittest . TestCase ) : <EOL> def build_app ( self ) : <EOL> app = Flask ( __name__ ) <EOL> app . debug = True <EOL> app . secret_key = '<STR_LIT>' <EOL> self . app = app <EOL> @ app . route ( '<STR_LIT:/>' ) <EOL> def foo ( ) : <EOL> return '<STR_LIT>' <EOL> return app <EOL> def test_raptorize ( self ) : <EOL> app = self . build_app ( ) <EOL> init_app ( app ) <EOL> response = app . test_client ( ) . get ( "<STR_LIT:/>" ) <EOL> assert '<STR_LIT>' in response . data <EOL> def test_resources ( self ) : <EOL> app = self . build_app ( ) <EOL> init_app ( app ) <EOL> response = app . test_client ( ) . get ( "<STR_LIT>" ) <EOL> assert '<STR_LIT>' in response . data <EOL> assert response . status == "<STR_LIT>" <EOL> def test_options ( self ) : <EOL> app = self . build_app ( ) <EOL> app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> app . config [ '<STR_LIT>' ] = <NUM_LIT> <EOL> init_app ( app ) <EOL> response = app . test_client ( ) . get ( "<STR_LIT:/>" ) <EOL> assert '<STR_LIT>' in response . data <EOL> assert '<STR_LIT>' in response . data <EOL> def test_chance ( self ) : <EOL> app = self . build_app ( ) <EOL> app . config [ '<STR_LIT>' ] = <NUM_LIT:0> <EOL> init_app ( app ) <EOL> response = app . test_client ( ) . get ( "<STR_LIT:/>" ) <EOL> assert '<STR_LIT>' not in response . data <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
