Пример #1
0
 def test_flamingo(self):
     self.assertEqual(
         redact("The Press Secretary's codename is Flamingo",
                ['flamingo', 'eagle']),
         "The Press Secretary's codename is ****")
Пример #2
0
 def test_empty_sentence(self):
     self.assertEqual(redact("", ['flamingo', 'eagle']), "")
Пример #3
0
 def test_empty_input(self):
     self.assertEqual(redact('', []), '')
Пример #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")
Пример #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")
Пример #6
0
 def test_two_flamingos(self):
     self.assertEqual(
         redact("Flamingo hates that her codename is Flamingo",
                ['flamingo', 'eagle']),
         "**** hates that her codename is ****")
Пример #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")
Пример #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")
Пример #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")
Пример #10
0
 def test_empty_input(self):
     self.assertEqual(redact('', []), '')
Пример #11
0
 def test_flamingo(self):
     self.assertEqual(redact("The Press Secretary's codename is Flamingo", ['flamingo', 'eagle']),
                      "The Press Secretary's codename is ****")
Пример #12
0
 def test_empty_sentence(self):
     self.assertEqual(redact("", ['flamingo', 'eagle']), "")
Пример #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")
Пример #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")
Пример #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")
Пример #16
0
 def test_two_flamingos(self):
     self.assertEqual(redact("Flamingo hates that her codename is Flamingo", ['flamingo', 'eagle']),
                      "**** hates that her codename is ****")