Skip to content

Commit

Permalink
twitter: test that whitespace is preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Jun 3, 2019
1 parent 1214748 commit 5ae27cd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions granary/tests/test_twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,22 @@ def test_tweet_to_object_multiple_pictures_only_one_picture_link(self):
},
}))

def test_tweet_to_object_preserve_whitespace(self):
text = r"""\
( •_•) (•_• )
( ง )ง ୧( ୧ )
/︶\ /︶\ """
tweet = {
'id_str': '1',
'full_text': text,
}
obj = {
'objectType': 'note',
'id': tag_uri('1'),
'content': text,
}
self.assert_equals(obj, self.twitter.tweet_to_object(tweet))

def test_reply_tweet_to_activity(self):
tweet = copy.deepcopy(TWEET)
tweet.update({
Expand Down

0 comments on commit 5ae27cd

Please sign in to comment.