@patch('braubuddy.output.twitterapi.twitter')
    def test_auth_without_creds_file(self, mk_twitter):
        fake_token = '0123456789'
        fake_secret = 'abcdefghij'
        fake_creds_dir = tempfile.mkdtemp()
        fake_creds_file = os.path.join(
            fake_creds_dir, twitterapi.CREDS_FILENAME)
        mk_twitter.read_token_file.return_value = (fake_token, fake_secret)
        with patch('braubuddy.output.twitterapi.CREDS_FILE',
                   new=fake_creds_file):
            test_output = twitterapi.TwitterAPIOutput()
            mk_twitter.oauth_dance.assert_called_once_with(
                twitterapi.APP,
                twitterapi.TCK,
                twitterapi.TCS,
                fake_creds_file)
        shutil.rmtree(fake_creds_dir)
A new credentials file is created.
dataset/ETHPy150Open amorphic/braubuddy/braubuddy/tests/output/test_twitterapi.py/TwitterAPIOutputAuth.test_auth_without_creds_file