Example #1
0
 def test_b64encode(self):
     self.assertEqual(json.b64encode('<script>alert("hello")</script>'),
                      'IjxzY3JpcHQ+YWxlcnQoXCJoZWxsb1wiKTxcL3NjcmlwdD4i')
Example #2
0
 def _encode(self, value):
     return json.b64encode(value)
 def test_b64encode(self):
     self.assertEqual(json.b64encode(
         '<script>alert("hello")</script>'),
         'IjxzY3JpcHQ+YWxlcnQoXCJoZWxsb1wiKTxcL3NjcmlwdD4i')