Commit 99c059a1 authored by Ryan Petrello's avatar Ryan Petrello

test tower-cli login --scope

parent 77b1dfb3
......@@ -330,11 +330,12 @@ class LoginTests(unittest.TestCase):
'token': 'abc123'
}), status_code=201, method='POST')
result = self.runner.invoke(
login, ['bob', '--password', 'secret']
login, ['bob', '--password', 'secret', '--scope', 'read']
)
# Ensure that we got a zero exit status
self.assertEqual(result.exit_code, 0)
assert json.loads(t.requests[-1].body)['scope'] == 'read'
# Ensure that the output seems to be correct.
self.assertIn(mock.call(os.path.expanduser('~/.tower_cli.cfg'), 'w'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment