API - update python dependencies
This commit is contained in:
@ -144,7 +144,7 @@ def update_application_config(auth_user_id):
|
||||
|
||||
@config_blueprint.route('/ping', methods=['GET'])
|
||||
def health_check():
|
||||
""" health check endpoint
|
||||
"""health check endpoint
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
@ -887,7 +887,11 @@ class TestRegistrationConfiguration:
|
||||
assert data['message'] == 'Error. Registration is disabled.'
|
||||
|
||||
def test_it_does_not_disable_registration_on_user_registration(
|
||||
self, app_no_config, app_config, user_1_admin, user_2,
|
||||
self,
|
||||
app_no_config,
|
||||
app_config,
|
||||
user_1_admin,
|
||||
user_2,
|
||||
):
|
||||
app_config.max_users = 4
|
||||
client = app_no_config.test_client()
|
||||
@ -985,7 +989,12 @@ class TestPasswordUpdate:
|
||||
|
||||
response = client.post(
|
||||
'/api/auth/password/update',
|
||||
data=json.dumps(dict(token='xxx', password='1234567',)),
|
||||
data=json.dumps(
|
||||
dict(
|
||||
token='xxx',
|
||||
password='1234567',
|
||||
)
|
||||
),
|
||||
content_type='application/json',
|
||||
)
|
||||
|
||||
@ -1000,7 +1009,10 @@ class TestPasswordUpdate:
|
||||
response = client.post(
|
||||
'/api/auth/password/update',
|
||||
data=json.dumps(
|
||||
dict(password='12345678', password_conf='12345678',)
|
||||
dict(
|
||||
password='12345678',
|
||||
password_conf='12345678',
|
||||
)
|
||||
),
|
||||
content_type='application/json',
|
||||
)
|
||||
@ -1015,7 +1027,12 @@ class TestPasswordUpdate:
|
||||
|
||||
response = client.post(
|
||||
'/api/auth/password/update',
|
||||
data=json.dumps(dict(token='xxx', password_conf='12345678',)),
|
||||
data=json.dumps(
|
||||
dict(
|
||||
token='xxx',
|
||||
password_conf='12345678',
|
||||
)
|
||||
),
|
||||
content_type='application/json',
|
||||
)
|
||||
|
||||
@ -1029,7 +1046,12 @@ class TestPasswordUpdate:
|
||||
|
||||
response = client.post(
|
||||
'/api/auth/password/update',
|
||||
data=json.dumps(dict(token='xxx', password='12345678',)),
|
||||
data=json.dumps(
|
||||
dict(
|
||||
token='xxx',
|
||||
password='12345678',
|
||||
)
|
||||
),
|
||||
content_type='application/json',
|
||||
)
|
||||
|
||||
|
@ -248,7 +248,11 @@ class TestGetUsers:
|
||||
|
||||
@patch('fittrackee_api.users.users.USER_PER_PAGE', 2)
|
||||
def test_it_gets_first_page_on_users_list(
|
||||
self, app, user_1, user_2, user_3,
|
||||
self,
|
||||
app,
|
||||
user_1,
|
||||
user_2,
|
||||
user_3,
|
||||
):
|
||||
client = app.test_client()
|
||||
resp_login = client.post(
|
||||
@ -279,7 +283,11 @@ class TestGetUsers:
|
||||
|
||||
@patch('fittrackee_api.users.users.USER_PER_PAGE', 2)
|
||||
def test_it_gets_next_page_on_users_list(
|
||||
self, app, user_1, user_2, user_3,
|
||||
self,
|
||||
app,
|
||||
user_1,
|
||||
user_2,
|
||||
user_3,
|
||||
):
|
||||
client = app.test_client()
|
||||
resp_login = client.post(
|
||||
@ -309,7 +317,11 @@ class TestGetUsers:
|
||||
}
|
||||
|
||||
def test_it_gets_empty_next_page_on_users_list(
|
||||
self, app, user_1, user_2, user_3,
|
||||
self,
|
||||
app,
|
||||
user_1,
|
||||
user_2,
|
||||
user_3,
|
||||
):
|
||||
client = app.test_client()
|
||||
resp_login = client.post(
|
||||
@ -339,7 +351,11 @@ class TestGetUsers:
|
||||
}
|
||||
|
||||
def test_it_gets_user_list_with_2_per_page(
|
||||
self, app, user_1, user_2, user_3,
|
||||
self,
|
||||
app,
|
||||
user_1,
|
||||
user_2,
|
||||
user_3,
|
||||
):
|
||||
client = app.test_client()
|
||||
resp_login = client.post(
|
||||
@ -369,7 +385,11 @@ class TestGetUsers:
|
||||
}
|
||||
|
||||
def test_it_gets_next_page_on_user_list_with_2_per_page(
|
||||
self, app, user_1, user_2, user_3,
|
||||
self,
|
||||
app,
|
||||
user_1,
|
||||
user_2,
|
||||
user_3,
|
||||
):
|
||||
client = app.test_client()
|
||||
resp_login = client.post(
|
||||
|
@ -250,7 +250,7 @@ def get_single_user(auth_user_id, user_name):
|
||||
|
||||
@users_blueprint.route('/users/<user_name>/picture', methods=['GET'])
|
||||
def get_picture(user_name):
|
||||
""" get user picture
|
||||
"""get user picture
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
@ -22,7 +22,9 @@ def get_user_token(user_id, password_reset=False):
|
||||
'sub': user_id,
|
||||
}
|
||||
return jwt.encode(
|
||||
payload, current_app.config.get('SECRET_KEY'), algorithm='HS256',
|
||||
payload,
|
||||
current_app.config.get('SECRET_KEY'),
|
||||
algorithm='HS256',
|
||||
)
|
||||
|
||||
|
||||
|
1178
fittrackee_api/poetry.lock
generated
1178
fittrackee_api/poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@ dramatiq = {extras = ["redis"], version = "^1.9.0"}
|
||||
flask-dramatiq = "^0.6.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
black = "^19.10b0"
|
||||
black = "^20.8b1"
|
||||
pytest = "^6.0"
|
||||
pytest-black = "^0.3.10"
|
||||
pytest-cov = "^2.10"
|
||||
@ -36,7 +36,7 @@ sphinxcontrib-httpdomain = "^1.7"
|
||||
sphinx-bootstrap-theme = "^0.7.1"
|
||||
recommonmark = "^0.6.0"
|
||||
pyopenssl = "^19.0"
|
||||
freezegun = "^0.3.15"
|
||||
freezegun = "^1.0.0"
|
||||
|
||||
[tool.pytest]
|
||||
norecursedirs = "fittrackee_api/.venv"
|
||||
|
Reference in New Issue
Block a user