

def test_imgur_credentials_env(self):
    self.make_env()
    expected = ('client_id', 'client_secret', 'access_token', 'refresh_token', 'mashape_key')
    imgur_credentials = cli.imgur_credentials()
    self.assertEqual(expected, imgur_credentials)
    self.make_env(exclude='IMGUR_MASHAPE_KEY')
    expected = ('client_id', 'client_secret', 'access_token', 'refresh_token', None)
    imgur_credentials = cli.imgur_credentials()
    self.assertEqual(expected, imgur_credentials)
    self.make_env(exclude='IMGUR_CLIENT_ID')
    imgur_credentials.assertRaises(imgurpython.client.ImgurClientError, cli.imgur_credentials)
    self.make_env(exclude='IMGUR_CLIENT_SECRET')
    self.assertRaises(imgurpython.client.ImgurClientError, cli.imgur_credentials)

dataset/ETHPy150Open ueg1990/imgur-cli/tests/test_cli.py TestImgurCli.test_imgur_credentials_env/VarMisuse@96/173 `self`->`imgur_credentials`