def test_loadstorerepo(self): erepo = Repository('testrepo', '1212') self.assertFalse(erepo.is_decrypted()) erepo.load() self.assertTrue(erepo.is_decrypted()) erepo.store() self.assertFalse(erepo.is_decrypted()) import os self.assertTrue(os.path.exists('repositories/testrepo.repo')) os.remove('repositories/testrepo.repo') self.assertFalse(os.path.exists('repositories/testrepo.repo'))
def test_newrepo(self): nrepo = Repository('testrepo', 'mypass') self.assertFalse(nrepo.is_decrypted()) nrepo.store() import os self.assertTrue(os.path.exists('repositories/testrepo.repo')) os.remove('repositories/testrepo.repo') self.assertFalse(os.path.exists('repositories/testrepo.repo'))