Skip to content

Commit

Permalink
Remove stale authenticate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
donnemartin committed May 23, 2016
1 parent 196c4aa commit 62d9125
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,6 @@ def test_config(self):
assert self.github.config \
.get_github_config_path(self.github.config.CONFIG) == expected

def test_authenticate_cached_credentials(self):
self.github.config.user_login = 'foo'
self.github.config.user_token = 'bar'
self.github.config.save_config()
self.github.config.user_login = ''
self.github.config.user_token = ''
self.github.config.api = None
config = self.github.config.get_github_config_path(
self.github.config.CONFIG)
parser = configparser.RawConfigParser()
self.github.config.authenticate_cached_credentials(config, parser)
assert self.github.config.user_login == 'foo'
assert self.github.config.user_token == 'bar'
assert self.github.config.api

@mock.patch('gitsome.github.click.secho')
@mock.patch('gitsome.config.Config.authenticate_cached_credentials')
def test_authenticate(self, mock_auth, mock_click_secho):
with mock.patch('click.confirm', return_value='y'):
with mock.patch('builtins.input', return_value='foo'):
self.github.config.authenticate(overwrite=True)
mock_click_secho.assert_called_with('Log in successful.')

@mock.patch('gitsome.github.click.secho')
def test_check_auth_error(self, mock_click_secho):
self.github.config.api = None
Expand Down

0 comments on commit 62d9125

Please sign in to comment.