Skip to content

Commit

Permalink
fixing tests for gh
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Nov 22, 2021
1 parent b9bd156 commit 4dab8a6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dev =
pytest>=5.2.2,<7.0
pytest-cov>=2.8.1,<3.0
pytest-sugar>=0.9.2,<1.0
pytest-mock>=3.3.1,<4.0
isort>=4.3.21,<6.0
codecov>=2.0.15,<3.0
coverage[toml]>=5.0,<7.0
Expand Down
4 changes: 3 additions & 1 deletion tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def test_init(self, auth):
[(None, None),
('token', 'Bearer testtoken'),
('netrc', 'Basic')], ids=['none', 'token', 'netrc'])
def test_call(self, monkeypatch, bestnet, req, auth, check):
def test_call(self, mocker, monkeypatch, bestnet, req, auth, check):
mocker.patch('brain.api.api.get_netrc_auth', return_value=('test', 'test'))

if auth == 'token':
monkeypatch.setattr(bconfig, 'token', 'testtoken')

Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import os
import pytest
from brain import bconfig
from requests.utils import get_netrc_auth



@pytest.fixture()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestVars(object):

@pytest.mark.parametrize('var, toval',
[('mode', 'remote'), ('access', 'collab'), ('compression', 'msgpack')])
def test_set(self, monkeypatch, var, toval):
def test_set(self, bestnet, monkeypatch, var, toval):
defval = bconfig.__getattribute__(var)
assert defval != toval
monkeypatch.setattr(bconfig, var, toval)
Expand Down

0 comments on commit 4dab8a6

Please sign in to comment.