def test_to_base64_file(self):
     d = IODict({
         'a': 1,
         'b': 2,
         'c': 3,
     })
     filepath = self.output_path('test_to_base64_file.base64')
     d.to_base64(filepath=filepath, sort_keys=True)
     self.assertFileExists(filepath)
     self.assertEqual(d, IODict.from_base64(filepath))
 def test_to_base64(self):
     d = IODict({
         'a': 1,
         'b': 2,
         'c': 3,
     })
     s = d.to_base64(sort_keys=True)
     self.assertEqual(s, 'eyJhIjogMSwgImIiOiAyLCAiYyI6IDN9')