def test_apostrophe_is_ok(self): m = Meme("amn't * -isn't") self.assertEqual(m.get_body(), "amn't *") self.assertEqual(m.get_exceptions(), "-isn't")
def test_accents_ok(self): m = Meme("milano é *") self.assertTrue(m.is_valid) self.assertEqual(m.raw_meme, "milano é *") self.assertEqual(m.get_body(), "milano é *")
def test_hypen_is_not_exception(self): m = Meme("foo-bar -baz") self.assertEqual(m.get_body(), "foo-bar") self.assertEqual(m.get_exceptions(), "-baz")
def test_valid_meme_has_body(self): m = Meme("all your * -base") self.assertEqual(m.get_body(), "all your *")
def test_invalid_characters(self): m = Meme("ok <>\"(){}[],.") self.assertEqual(m.get_body(), "ok")