Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Jun 13, 2024
1 parent edf769b commit 3362735
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions store/neurostore/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ def session(db):

@pytest.fixture(scope="session")
def mock_auth0_auth():
with patch.object(Users, 'userinfo', return_value={'name': 'newuser', 'nickname': 'new user'}):
with patch.object(
Users, "userinfo", return_value={"name": "newuser", "nickname": "new user"}
):
yield


Expand Down Expand Up @@ -294,7 +296,7 @@ def mock_add_users(app, db, session, mock_auth):
"external_id": token_info["sub"],
}

if u['name'] != "newuser":
if u["name"] != "newuser":
user = User(
name=u["name"],
external_id=token_info["sub"],
Expand All @@ -303,7 +305,9 @@ def mock_add_users(app, db, session, mock_auth):
db.session.add(user)
db.session.commit()

tokens[u["name"]]['id'] = User.query.filter_by(external_id=token_info["sub"]).first().id
tokens[u["name"]]["id"] = (
User.query.filter_by(external_id=token_info["sub"]).first().id
)

yield tokens

Expand Down

0 comments on commit 3362735

Please sign in to comment.