def test_txt_keymaker(self): """ Test the TxtKeymaker, which makes one key for each .txt file in a given directory. """ keymaker = rmm.TxtKeymaker() # Set application API keys keymaker.set_apikeys_file(self.api_keys) # Create bot API keys txtdir = os.path.join(thisdir, 'txt/') with captured_output() as (out, err): keymaker.make_keys(txtdir, keys_out_dir=self.keys_dir, interactive=False) # Assert output = out.getvalue().strip() self.assertIn('Creating fake Twitter key', output)
def setup(): k = rmm.TxtKeymaker() k.set_apikeys_file('apikeys.json') k.make_keys(DATADIR, KEYSDIR)
def setup(): k = rmm.TxtKeymaker() k.set_apikeys_file('apikeys.json') k.make_keys('poems/')
def setup(): k = rmm.TxtKeymaker() k.make_keys('data/')
def setup(): # create a keymaker that creates one key per text file k = rmm.TxtKeymaker() # create keys from text files in poems/ k.make_keys('poems/')
def setup(): k = rmm.TxtKeymaker() k.set_apikeys_file(os.path.join(BASEDIR, 'apikeys.json')) k.make_keys(DATADIR, KEYSDIR)
def setup(): k = rmm.TxtKeymaker() k.make_keys('poems/')