Exemple #1
0
    def transform(collection):
        output_collection = list()
        for entry in collection:
            output_collection.append(BlogEntry(TextUtil.to_lower_case(entry.title()), \
            entry.date(), entry.url(), TextUtil.to_lower_case(entry.text()), 
            entry.source, entry.crawl_url))

        return BlogEntryCollection(output_collection)
Exemple #2
0
 def test_to_lower_case(self):
     self.assertEquals('pizza', TextUtil.to_lower_case("PIZZA"))
     self.assertEquals('pizza', TextUtil.to_lower_case("PizZA"))
     self.assertEquals('pizza', TextUtil.to_lower_case("pizza"))