-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from FinnStutzenstein/authEndpoint
Get endpoint fom env variables
- Loading branch information
Showing
6 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import requests | ||
|
||
from ..http_handler import HttpHandler | ||
from ..constants import AUTH_TEST_URL | ||
|
||
credentials = {"username": "admin", "password": "admin"} | ||
|
||
|
||
class FakeRequest: | ||
http_handler = HttpHandler(AUTH_TEST_URL) | ||
http_handler = HttpHandler() | ||
|
||
def test_connection(self): | ||
return requests.get(f"{AUTH_TEST_URL}/system/auth/") | ||
return requests.get(f"{self.http_handler.auth_endpoint}/system/auth/") | ||
|
||
def login(self): | ||
return self.http_handler.send_request("login", payload=credentials) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters