Ejemplo n.º 1
0
 def test_flamingo(self):
     self.assertEqual(
         redact("The Press Secretary's codename is Flamingo",
                ['flamingo', 'eagle']),
         "The Press Secretary's codename is ****")
Ejemplo n.º 2
0
 def test_empty_sentence(self):
     self.assertEqual(redact("", ['flamingo', 'eagle']), "")
Ejemplo n.º 3
0
 def test_empty_input(self):
     self.assertEqual(redact('', []), '')
Ejemplo n.º 4
0
 def test_empty_list(self):
     self.assertEqual(
         redact("Though I hear of a storm due to hit us later", []),
         "Though I hear of a storm due to hit us later")
Ejemplo n.º 5
0
 def test_substring(self):
     self.assertEqual(
         redact("Flamingoland was my local theme park growing up",
                ['flamingo', 'eagle']),
         "Flamingoland was my local theme park growing up")
Ejemplo n.º 6
0
 def test_two_flamingos(self):
     self.assertEqual(
         redact("Flamingo hates that her codename is Flamingo",
                ['flamingo', 'eagle']),
         "**** hates that her codename is ****")
Ejemplo n.º 7
0
 def test_no_match(self):
     self.assertEqual(
         redact("The weather has been clement for the time of year",
                ['flamingo', 'eagle']),
         "The weather has been clement for the time of year")
Ejemplo n.º 8
0
 def test_flamingo_and_eagle(self):
     self.assertEqual(redact("Flamingo and Eagle are meeting at 11:00", ['flamingo', 'eagle']),
                      "**** and **** are meeting at 11:00")
Ejemplo n.º 9
0
 def test_flamingo_and_eagle(self):
     self.assertEqual(
         redact("Flamingo and Eagle are meeting at 11:00",
                ['flamingo', 'eagle']),
         "**** and **** are meeting at 11:00")
Ejemplo n.º 10
0
 def test_empty_input(self):
     self.assertEqual(redact('', []), '')
Ejemplo n.º 11
0
 def test_flamingo(self):
     self.assertEqual(redact("The Press Secretary's codename is Flamingo", ['flamingo', 'eagle']),
                      "The Press Secretary's codename is ****")
Ejemplo n.º 12
0
 def test_empty_sentence(self):
     self.assertEqual(redact("", ['flamingo', 'eagle']), "")
Ejemplo n.º 13
0
 def test_substring(self):
     self.assertEqual(redact("Flamingoland was my local theme park growing up", ['flamingo', 'eagle']),
                      "Flamingoland was my local theme park growing up")
Ejemplo n.º 14
0
 def test_empty_list(self):
     self.assertEqual(redact("Though I hear of a storm due to hit us later", []),
                             "Though I hear of a storm due to hit us later")
Ejemplo n.º 15
0
 def test_no_match(self):
     self.assertEqual(redact("The weather has been clement for the time of year", ['flamingo', 'eagle']),
                      "The weather has been clement for the time of year")
Ejemplo n.º 16
0
 def test_two_flamingos(self):
     self.assertEqual(redact("Flamingo hates that her codename is Flamingo", ['flamingo', 'eagle']),
                      "**** hates that her codename is ****")