<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import urllib <EOL> from flask import Flask <EOL> from flask_bcs import BCS <EOL> BCS_HOST = '<STR_LIT>' <EOL> BCS_ACCESS_KEY = '<STR_LIT>' <EOL> BCS_SECRET_KEY = '<STR_LIT>' <EOL> BCS_BUCKET_NAME = '<STR_LIT>' <EOL> class FlaskBCSTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . app = Flask ( __name__ ) <EOL> self . app . config . from_object ( __name__ ) <EOL> self . bcs = BCS ( self . app ) <EOL> def test_save ( self ) : <EOL> data = '<STR_LIT>' <EOL> filename = '<STR_LIT>' <EOL> allow_referers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> ret = self . bcs . save ( data , filename , allow_referers ) <EOL> self . assertIsInstance ( ret , dict ) <EOL> self . assertEqual ( ret [ '<STR_LIT:status>' ] , <NUM_LIT:200> ) <EOL> def test_delete ( self ) : <EOL> data = '<STR_LIT>' <EOL> filename = '<STR_LIT>' <EOL> self . bcs . save ( data , filename ) <EOL> ret = self . bcs . delete ( filename ) <EOL> self . assertIsInstance ( ret , dict ) <EOL> self . assertEqual ( ret [ '<STR_LIT:status>' ] , <NUM_LIT:200> ) <EOL> def test_url ( self ) : <EOL> data = '<STR_LIT>' <EOL> filename = '<STR_LIT>' <EOL> self . bcs . save ( data , filename ) <EOL> url = self . bcs . url ( filename ) <EOL> resp = urllib . urlopen ( url ) <EOL> self . assertEqual ( data , resp . read ( ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
