Exemple #1
0
 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")
Exemple #2
0
 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 é *")
Exemple #3
0
 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")
Exemple #4
0
 def test_valid_meme_has_body(self):
     m = Meme("all your * -base")
     self.assertEqual(m.get_body(), "all your *")
Exemple #5
0
 def test_invalid_characters(self):
     m = Meme("ok <>\"(){}[],.")
     self.assertEqual(m.get_body(), "ok")
Exemple #6
0
 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")
Exemple #7
0
 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")
Exemple #8
0
 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 é *")
Exemple #9
0
 def test_invalid_characters(self):
     m = Meme("ok <>\"(){}[],.")
     self.assertEqual(m.get_body(), "ok")
Exemple #10
0
 def test_valid_meme_has_body(self):
     m = Meme("all your * -base")
     self.assertEqual(m.get_body(), "all your *")