def test_article_event_has_authors_as_an_array(raw_article): event = pocket.article_to_event(raw_article) assert event["authors"] == [{u'author_id': u'9109759', u'item_id': u'605584922', u'name': u'Matt Gemmell', u'url': u'http://mattgemmell.com/about'}]
def test_cleanup_article_converts_word_count_to_int(raw_article): event = pocket.article_to_event(raw_article) assert event["word_count"] == 1943
def test_cleanup_article_data_replaces_empty_timestamps_with_nones(raw_article): event = pocket.article_to_event(raw_article) assert event["time_favorited"] is None
def test_cleanup_article_data_uses_bools(raw_article): event = pocket.article_to_event(raw_article) assert event["is_article"] assert event["favorite"] is False
def test_cleanup_article_data_transforms_timestamps(raw_article): event = pocket.article_to_event(raw_article) assert event["time_added"] == "2014-05-17T12:36:45"