<s> import unittest <EOL> from sitemap import * <EOL> class TestUrlSetElement ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . record = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> def testCreateOnlyWithLocation ( self ) : <EOL> params = { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> e = UrlSetElement ( ** params ) <EOL> def testCreateFails_MissingLocation ( self ) : <EOL> params = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . assertRaises ( ValueError , UrlSetElement , ** params ) <EOL> def testCreateFails_InvalidUrl ( self ) : <EOL> params = { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . assertRaises ( InvalidUrl , UrlSetElement , ** params ) <EOL> def testCreateFails_InvalidLastMod ( self ) : <EOL> params = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . assertRaises ( InvalidDate , UrlSetElement , ** params ) <EOL> def testCreateFails_InvalidChangeFreq ( self ) : <EOL> params = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . assertRaises ( InvalidChangeFreq , UrlSetElement , ** params ) <EOL> def testCreateFails_InvalidPriority ( self ) : <EOL> params = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . assertRaises ( InvalidPriority , UrlSetElement , ** params ) </s>
