-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hid HTTP request logs in tests; fixed a deprecation warning #147
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ omit = | |
*/templates/* | ||
*/static/* | ||
*/examples/* | ||
tests/* | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[metadata] | ||
description-file = README.md | ||
description_file = README.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixes the following deprecation warning
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ click | |
coverage | ||
coveralls | ||
docopt | ||
enum34 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes a deprecation warning:
|
||
flake8 | ||
funcsigs | ||
gunicorn | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import logging | ||
import os | ||
import unittest | ||
from click.testing import CliRunner | ||
|
@@ -12,6 +13,11 @@ | |
from virl2_client import ClientLibrary | ||
|
||
|
||
# set to warning to hide unwanted HTTP requests | ||
logger = logging.getLogger("httpx") | ||
logger.setLevel(logging.WARNING) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. httpx logs unnecessary HTTP requests while testing (imo not needed)
|
||
|
||
|
||
def setup_cml_environ(): | ||
os.environ["VIRL_HOST"] = "localhost" | ||
os.environ["VIRL_USERNAME"] = "admin" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a point in covering test files, but I put it into a separate commit in case it needs to be reverted.