def test_remove_usernames(self): text = "hello @username xxx" result = TwitterMixin.remove_usernames(text).split() expect = "hello xxx".split() self.assertEqual(expect, result)