Skip to content

Commit

Permalink
Merge pull request #97 from snarfed/kylewm/brevity-upgrade
Browse files Browse the repository at this point in the history
upgrade brevity and add test to verify new behavior
  • Loading branch information
snarfed committed Sep 5, 2016
2 parents dc25512 + d1c2bfa commit 229a086
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions granary/test/test_twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,14 @@ def test_tweet_truncate(self):
'note', False)
self.assertEquals(expected, result)

orig = (u'Leaving this here for future reference. Turn on debug menu '
u'in Mac App Store `defaults write com.apple.appstore ShowDebugMenu '
u'-bool true`')
expected = (u'Leaving this here for future reference. Turn on debug menu '
u'in Mac App Store `defaults write com.apple.appstore ShowDebugMenu…')
result = self.twitter._truncate(orig, 'http://foo.com', source.OMIT_LINK, 'note', False)
self.assertEquals(expected, result)

twitter.MAX_TWEET_LENGTH = 20
twitter.TCO_LENGTH = 5

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ mf2util>=0.3.3
oauth-dropins>=1.5
requests>=2.10.0
requests-toolbelt>=0.6.2
brevity>=0.2.8
brevity>=0.2.10
urllib3>=1.14

0 comments on commit 229a086

Please sign in to comment.