Esempio n. 1
0
 def test_compress_and_encrypt(self):
     add_public_gpg()
     self.command.backup_mediafiles(encrypt=True, compress=True)
     self.assertEqual(1, len(HANDLED_FILES['written_files']))
     outputfile = HANDLED_FILES['written_files'][0][1]
     outputfile.seek(0)
     self.assertTrue(outputfile.read().startswith(b'-----BEGIN PGP MESSAGE-----'))
 def test_compress_and_encrypt(self):
     add_public_gpg()
     self.command.backup_mediafiles(encrypt=True, compress=True)
     self.assertEqual(1, len(HANDLED_FILES['written_files']))
     outputfile = HANDLED_FILES['written_files'][0][1]
     outputfile.seek(0)
     self.assertTrue(outputfile.read().startswith(b'-----BEGIN PGP MESSAGE-----'))
Esempio n. 3
0
 def setUp(self):
     self.path = tempfile.mktemp()
     with open(self.path, 'a') as fd:
         fd.write('foo')
     add_public_gpg()
Esempio n. 4
0
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
     add_private_gpg()
     open(TEST_DATABASE['NAME'], 'a').close()
Esempio n. 5
0
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
Esempio n. 6
0
 def test_encrypt(self):
     add_public_gpg()
     self.command.encrypt = True
     self.command.save_new_backup(TEST_DATABASE)
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
     add_private_gpg()
     open(TEST_DATABASE['NAME'], 'a').close()
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
Esempio n. 9
0
 def setUp(self):
     self.path = tempfile.mktemp()
     with open(self.path, 'a') as fd:
         fd.write('foo')
     add_public_gpg()
Esempio n. 10
0
 def setUp(self):
     self.path = '/tmp/foo'
     with open(self.path, 'a') as fd:
         fd.write('foo')
     add_public_gpg()
Esempio n. 11
0
 def setUp(self):
     self.path = '/tmp/foo'
     with open(self.path, 'a') as fd:
         fd.write('foo')
     add_public_gpg()
Esempio n. 12
0
 def test_encrypt(self):
     add_public_gpg()
     self.command.encrypt = True
     self.command.save_new_backup(TEST_DATABASE)
Esempio n. 13
0
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
     add_private_gpg()
     open(TEST_DATABASE['NAME'], 'a').close()
     self.instance = models.CharModel.objects.create(field='foo')
Esempio n. 14
0
 def setUp(self):
     self.path = "/tmp/foo"
     with open(self.path, "a") as fd:
         fd.write("foo")
     add_public_gpg()
Esempio n. 15
0
 def setUp(self):
     HANDLED_FILES.clean()
     add_public_gpg()
     add_private_gpg()
     open(TEST_DATABASE['NAME'], 'a').close()
     self.instance = models.CharModel.objects.create(field='foo')