<s> from unittest import TestCase <EOL> import requests <EOL> from lxml import etree <EOL> from PIL import Image <EOL> host = '<STR_LIT>' <EOL> class TestWMS ( TestCase ) : <EOL> def assertSuccess ( self , response , msg = '<STR_LIT>' ) : <EOL> msg = msg . format ( code = response . status_code , response = response . text ) <EOL> self . assertGreaterEqual ( response . status_code , <NUM_LIT:200> , msg = msg ) <EOL> self . assertLess ( response . status_code , <NUM_LIT> , msg = msg ) <EOL> def test_GetCapabilities ( self ) : <EOL> rsp = requests . get ( '<STR_LIT>' . format ( host = host ) , params = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:version>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } ) <EOL> self . assertSuccess ( rsp ) <EOL> etree . parse ( rsp . text ) <EOL> def test_GetMap ( self ) : <EOL> rsp = requests . get ( '<STR_LIT>' . format ( host = host ) , params = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:version>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } , stream = True ) <EOL> self . assertSuccess ( rsp ) <EOL> Image . open ( rsp . raw ) <EOL> def test_GetFeatureInfo ( self ) : <EOL> self . fail ( '<STR_LIT>' ) <EOL> def test_GetTile ( self ) : <EOL> rsp = requests . get ( '<STR_LIT>' . format ( host = host ) , stream = True ) <EOL> self . assertSuccess ( rsp ) <EOL> Image . open ( rsp . raw ) </s>
