def test_replace_str(self):
     self.assertJson(
         query.replace_str("one fish two Fish", "fish", "dog"),
         '{"find":"fish","replace":"dog","replacestr":"one fish two Fish"}')
Exemplo n.º 2
0
 def test_replacestr(self):
     self.assertEqual(self._q(query.replace_str("ABCDE", "AB", "AA")),
                      "AACDE")
     self.assertEqual(
         self._q(query.replace_str("One Fish Two Fish", "Fish", "Cat")),
         "One Cat Two Cat")