Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/s/e/securedrop-HEAD/securedrop/crypto_util.py   securedrop(Download)
assert p.stdout.readline().split()[
    -1].split('.')[0] == '2', "upgrade GPG to 2.0"
gpg = gnupg.GPG(binary=GPG_BINARY, homedir=config.GPG_KEY_DIR)
 
words = file(config.WORD_LIST).read().split('\n')

src/s/e/securedrop-HEAD/securedrop/tests/unit_tests.py   securedrop(Download)
    def test_submit_dirty_file_to_be_cleaned(self):
        self.gpg = gnupg.GPG(homedir=config.GPG_KEY_DIR)
        img = open(os.getcwd()+'/tests/test_images/dirty.jpg')
        img_metadata = store.metadata_handler(img.name)
        self.assertFalse(img_metadata.is_clean(), "The file is dirty.")
    def test_submit_dirty_file_to_not_clean(self):
        self.gpg = gnupg.GPG(homedir=config.GPG_KEY_DIR)
        img = open(os.getcwd()+'/tests/test_images/dirty.jpg')
        img_metadata = store.metadata_handler(img.name)
        self.assertFalse(img_metadata.is_clean(), "The file is dirty.")
    def setUp(self):
        shared_setup()
        self.source_app = source.app.test_client()
        self.journalist_app = journalist.app.test_client()
        self.gpg = gnupg.GPG(homedir=config.GPG_KEY_DIR)

src/s/e/securedrop-HEAD/securedrop/tests/test_setup.py   securedrop(Download)
def create_directories():
    # Create directories for the file store and the GPG keyring
    for d in (config.SECUREDROP_ROOT, config.STORE_DIR, config.GPG_KEY_DIR):
        if not os.path.isdir(d):
            os.mkdir(d)
 
def init_gpg():
    # Initialize the GPG keyring
    gpg = gnupg.GPG(homedir=config.GPG_KEY_DIR)