Skip to content

Commit

Permalink
Better feedback (#203)
Browse files Browse the repository at this point in the history
* Improve introspection into connection failures

* Bump version

* - Request custom token name
- Set log verbosity level

* Fix URL construction

* Cleanup

* API tweaks

* Update unit tests

* Ignore C901
  • Loading branch information
SchrodingersGat authored Nov 21, 2023
1 parent 81bf901 commit a2dabeb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inventree/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from . import api as inventree_api


INVENTREE_PYTHON_VERSION = "0.12.2"
INVENTREE_PYTHON_VERSION = "0.13.0"


logger = logging.getLogger('inventree')
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[flake8]
ignore =
C901,
# - W293 - blank lines contain whitespace
W293,
# - E501 - line too long (82 characters)
Expand Down
4 changes: 4 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def test(c, source=None, update=False, reset=False, debug=False):

# If a source file is provided, check that it actually exists
if source:

if not source.endswith('.py'):
source += '.py'

if not os.path.exists(source):
source = os.path.join('test', source)

Expand Down
2 changes: 2 additions & 0 deletions test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def setUp(self):
SERVER,
username=USERNAME, password=PASSWORD,
timeout=30,
token_name='python-test',
use_token_auth=True
)


Expand Down

0 comments on commit a2dabeb

Please sign in to comment.