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')
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, [])