Skip to content

Commit

Permalink
verify rejected auth as well
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed May 23, 2023
1 parent 385c300 commit f230919
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,23 @@ def test_clone_default(jupyterdir, jupyter_server):
assert os.path.isdir(os.path.join(target_path, '.git'))


def test_clone_auth(jupyterdir, jupyter_server):
"""
Tests use of 'repo' and 'branch' parameters.
"""
with Remote() as remote, Pusher(remote) as pusher:
pusher.push_file('README.md', 'Testing some content')
print(f'path: {remote.path}')
params = {
'repo': remote.path,
'branch': 'master',
'token': 'wrong',
}
r = request_api(params)
# no token, redirect to login
assert r.code == 302


def test_clone_targetpath(jupyterdir, jupyter_server):
"""
Tests use of 'targetpath' parameter.
Expand Down

0 comments on commit f230919

Please sign in to comment.