Skip to content

Commit

Permalink
Update test for "basic auth" handling change in openeo python client
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Oct 11, 2021
1 parent e26a4a2 commit 88b20ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package_dir={"": "src"},
install_requires=[
"requests",
"openeo>=0.7.1a1.*",
"openeo>=0.8.3a3.*",
"openeo_driver>=0.14.3a1.*",
"flask~=2.0",
"gunicorn~=20.0",
Expand Down
5 changes: 4 additions & 1 deletion tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
class TestBackendConnection:

def test_plain_basic_auth_fails(self, requests_mock):
requests_mock.get("https://foo.test/", json={"api_version": "1.0.0"})
requests_mock.get("https://foo.test/", json={
"api_version": "1.0.0",
"endpoints": [{"path": "/credentials/basic", "methods":["GET"]}]
})
requests_mock.get("https://foo.test/credentials/basic", json={"access_token": "3nt3r"})
con = BackendConnection(id="foo", url="https://foo.test")
with pytest.raises(LockedAuthException):
Expand Down

0 comments on commit 88b20ed

Please sign in to comment.