Esempio n. 1
0
 def test_save_dictionary(self):
     f = BytesIO()
     d = {
         'S/T': '{pre^}',
     }
     save_dictionary(d, f)
     expected = b'{\\rtf1\\ansi{\\*\\cxrev100}\\cxdict{\\*\\cxsystem Plover}{\\stylesheet{\\s0 Normal;}}\r\n{\\*\\cxs S///T}pre\\cxds \r\n}\r\n'
     self.assertEqual(f.getvalue(), expected)
Esempio n. 2
0
 def test_save_dictionary(self):
     f = StringIO()
     d = {
     'S/T': '{pre^}',
     }
     save_dictionary(d, f)
     expected = '{\\rtf1\\ansi{\\*\\cxrev100}\\cxdict{\\*\\cxsystem Plover}{\\stylesheet{\\s0 Normal;}}\r\n{\\*\\cxs S///T}pre\\cxds \r\n}\r\n' 
     self.assertEqual(f.getvalue(), expected)