Ejemplo n.º 1
0
 def handle(self, *args, **options):
     if options['backup']:
         memory_backup(options['indent'])
         return
     memory = TranslationMemory()
     self.stdout.ending = None
     memory.dump(self.stdout, indent=options['indent'])
     self.stdout.write('\n')
Ejemplo n.º 2
0
 def handle(self, *args, **options):
     if options['backup']:
         memory_backup(options['indent'])
         return
     memory = TranslationMemory()
     self.stdout.ending = None
     memory.dump(self.stdout, indent=options['indent'])
     self.stdout.write('\n')
Ejemplo n.º 3
0
 def test_memory_backup(self):
     memory_backup()
     filename = data_dir("backups", "memory.json")
     with open(filename) as handle:
         data = json.load(handle)
     self.assertEqual(data, [])