def testToAndFromString(self):
     entry = webmastertools.SitesEntry(
         indexed=webmastertools.Indexed(text='true'),
         crawled=webmastertools.Crawled(text='2008-09-14T08:59:28.000'),
         geolocation=webmastertools.GeoLocation(text='US'),
         preferred_domain=webmastertools.PreferredDomain(text='none'),
         crawl_rate=webmastertools.CrawlRate(text='normal'),
         enhanced_image_search=webmastertools.EnhancedImageSearch(
             text='true'),
         verified=webmastertools.Verified(text='false'),
     )
     self.assert_(entry.indexed.text == 'true')
     self.assert_(entry.crawled.text == '2008-09-14T08:59:28.000')
     self.assert_(entry.geolocation.text == 'US')
     self.assert_(entry.preferred_domain.text == 'none')
     self.assert_(entry.crawl_rate.text == 'normal')
     self.assert_(entry.enhanced_image_search.text == 'true')
     self.assert_(entry.verified.text == 'false')
     new_entry = webmastertools.SitesEntryFromString(entry.ToString())
     self.assert_(new_entry.indexed.text == 'true')
     self.assert_(new_entry.crawled.text == '2008-09-14T08:59:28.000')
     self.assert_(new_entry.geolocation.text == 'US')
     self.assert_(new_entry.preferred_domain.text == 'none')
     self.assert_(new_entry.crawl_rate.text == 'normal')
     self.assert_(new_entry.enhanced_image_search.text == 'true')
     self.assert_(new_entry.verified.text == 'false')
 def setUp(self):
     self.indexed = webmastertools.Indexed()