Last active
October 24, 2015 14:33
-
-
Save sjmf/f9abc227c99c8c416ea9 to your computer and use it in GitHub Desktop.
Testcases for tweet stripping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test(): | |
assert get_msg("@ol_fridge print this please", "ol_fridge") == "print this please" | |
assert get_msg(".@ol_fridge print this too", "ol_fridge") == "print this too" | |
assert get_msg("This should be printed too @ol_fridge", "ol_fridge") == "This should be printed too" | |
assert get_msg("@ol_fridge @SamMFinnigan this should too", "ol_fridge") == "this should too" | |
assert get_msg("@SamMFinnigan @ol_fridge this should also", "ol_fridge") == "this should also" | |
# don't print these | |
assert get_msg("But @ol_fridge shouldn't", "ol_fridge") == False | |
assert get_msg("@SamMFinnigan don't print @ol_fridge", "ol_fridge") == False | |
assert get_msg(".@SamMFinnigan don't print @ol_fridge", "ol_fridge") == False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment