-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import pytest | ||
from requests import Request | ||
|
||
|
||
def remove_creds(request: Request) -> Request: | ||
# remove username and password | ||
return request | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def vcr_config() -> dict: | ||
config = dict() | ||
config['before_record_request'] = remove_creds | ||
return config |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from dhlmex import Client | ||
|
||
DHLMEX_USERNAME = os.environ['DHLMEX_USERNAME'] | ||
DHLMEX_PASSWORD = os.environ['DHLMEX_PASSWORD'] | ||
|
||
|
||
@pytest.mark.vcr | ||
def test_successful_login(): | ||
assert Client(DHLMEX_USERNAME, DHLMEX_PASSWORD) | ||
|