Example #1
0
 def test_whole_sentence(self):
     sentence = "This & that & that & this."
     encoded = "This & that & that & this."
     self.assertEqual(encode_ampersands(sentence), encoded)
Example #2
0
 def test_copyright(self):
     self.assertEqual(encode_ampersands("©"), "©")
Example #3
0
 def test_numeric_encoding(self):
     self.assertEqual(encode_ampersands("&"), "&")
Example #4
0
 def test_a_and_w(self):
     self.assertEqual(encode_ampersands("A&W"), "A&W")
Example #5
0
 def test_encoded_ampersand(self):
     self.assertEqual(encode_ampersands("&"), "&")
 def test_whole_sentence(self):
     sentence = "This & that & that & this."
     encoded = "This & that & that & this."
     self.assertEqual(encode_ampersands(sentence), encoded)
 def test_numeric_encoding(self):
     self.assertEqual(encode_ampersands("&"), "&")
 def test_copyright(self):
     self.assertEqual(encode_ampersands("©"), "©")
 def test_encoded_ampersand(self):
     self.assertEqual(encode_ampersands("&"), "&")
 def test_a_and_w(self):
     self.assertEqual(encode_ampersands("A&W"), "A&W")