def test_02_load_info_from_feed(self): feed_url = 'http://blog.openshakespeare.org/category/wordoftheday/?feed=atom' wordm.load_word_info_from_feed(feed_url) model.Session.remove() # load twice to ensure we can deal with duplicates wordm.load_word_info_from_feed(feed_url) model.Session.remove() current = model.Word.word_of_the_day() assert current.name assert current.notes, current
def word_of_the_day(self): import shakespeare.model.word as word word.load_word_info_from_feed() return 'Processed all entries ok'
def do_word_of_the_day(self, line=None): self._register_config() import shakespeare.model.word as word # use feed url from config word.load_word_info_from_feed()