Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(deps): update dependency requests to v2.31.0 [security]#2627

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 2 commits intomainfromjlvillal/requests
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionrequirements-test.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,6 @@ pytest-cov==4.1.0
pytest-github-actions-annotate-failures==0.2.0
pytest==7.4.0
PyYaml==6.0.1
responses==0.23.1
responses==0.23.3
setuptools==68.0.0
wheel==0.41.0
2 changes: 1 addition & 1 deletionrequirements.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
requests==2.28.2
requests==2.31.0
requests-toolbelt==1.0.0
typing-extensions==4.7.1 ; python_version < "3.8"
5 changes: 0 additions & 5 deletionstests/unit/objects/conftest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,11 +21,6 @@ def created_content():
return {"message": "201 Created"}


@pytest.fixture
def no_content():
return {"message": "204 No Content"}


@pytest.fixture
def resp_export(accepted_content, binary_content):
"""Common fixture for group and project exports."""
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_badges.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,13 +97,11 @@ def resp_update_badge():


@pytest.fixture()
def resp_delete_badge(no_content):
def resp_delete_badge():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url=re.compile(r"http://localhost/api/v4/(projects|groups)/1/badges/1"),
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
2 changes: 0 additions & 2 deletionstests/unit/objects/test_group_access_tokens.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,8 +75,6 @@ def resp_revoke_group_access_token():
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/groups/1/access_tokens/42",
json=content,
content_type="application/json",
status=204,
)
rsps.add(
Expand Down
10 changes: 3 additions & 7 deletionstests/unit/objects/test_groups.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -215,7 +215,7 @@ def resp_update_push_rules_group():


@pytest.fixture
def resp_delete_push_rules_group(no_content):
def resp_delete_push_rules_group():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.GET,
Expand All@@ -227,15 +227,13 @@ def resp_delete_push_rules_group(no_content):
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/groups/1/push_rule",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps


@pytest.fixture
def resp_list_ldap_group_links(no_content):
def resp_list_ldap_group_links():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.GET,
Expand DownExpand Up@@ -292,7 +290,7 @@ def resp_create_saml_group_link():


@pytest.fixture
def resp_delete_saml_group_link(no_content):
def resp_delete_saml_group_link():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.POST,
Expand All@@ -309,8 +307,6 @@ def resp_delete_saml_group_link(no_content):
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/groups/1/saml_group_links/saml-group-1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_job_artifacts.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,13 +25,11 @@ def resp_artifacts_by_ref_name(binary_content):


@pytest.fixture
def resp_project_artifacts_delete(no_content):
def resp_project_artifacts_delete():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/artifacts",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
6 changes: 2 additions & 4 deletionstests/unit/objects/test_members.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@


@pytest.fixture
def resp_create_group_member(no_content):
def resp_create_group_member():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.POST,
Expand All@@ -49,13 +49,11 @@ def resp_list_billable_group_members():


@pytest.fixture
def resp_delete_billable_group_member(no_content):
def resp_delete_billable_group_member():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/groups/1/billable_members/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
12 changes: 3 additions & 9 deletionstests/unit/objects/test_packages.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -137,33 +137,29 @@ def resp_get_package():


@pytest.fixture
def resp_delete_package(no_content):
def resp_delete_package():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/packages/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps


@pytest.fixture
def resp_delete_package_file(no_content):
def resp_delete_package_file():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/packages/1/package_files/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps


@pytest.fixture
def resp_delete_package_file_list(no_content):
def resp_delete_package_file_list():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.GET,
Expand All@@ -178,8 +174,6 @@ def resp_delete_package_file_list(no_content):
rsps.add(
method=responses.DELETE,
url=f"http://localhost/api/v4/projects/1/packages/1/package_files/{pkg_file_id}",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_personal_access_tokens.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -81,13 +81,11 @@ def resp_get_personal_access_token_self():


@pytest.fixture
def resp_delete_personal_access_token(no_content):
def resp_delete_personal_access_token():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url=single_token_url,
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
2 changes: 0 additions & 2 deletionstests/unit/objects/test_project_access_tokens.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,8 +75,6 @@ def resp_revoke_project_access_token():
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/access_tokens/42",
json=content,
content_type="application/json",
status=204,
)
rsps.add(
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -147,13 +147,11 @@ def resp_mr_approval_rules():


@pytest.fixture
def resp_delete_mr_approval_rule(no_content):
def resp_delete_mr_approval_rule():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/merge_requests/1/approval_rules/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
12 changes: 3 additions & 9 deletionstests/unit/objects/test_projects.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -361,13 +361,11 @@ def resp_share_project():


@pytest.fixture
def resp_unshare_project(no_content):
def resp_unshare_project():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/share/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand All@@ -387,13 +385,11 @@ def resp_create_fork_relation():


@pytest.fixture
def resp_delete_fork_relation(no_content):
def resp_delete_fork_relation():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/2/fork",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand DownExpand Up@@ -485,7 +481,7 @@ def resp_update_push_rules_project():


@pytest.fixture
def resp_delete_push_rules_project(no_content):
def resp_delete_push_rules_project():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.GET,
Expand All@@ -497,8 +493,6 @@ def resp_delete_push_rules_project(no_content):
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/push_rule",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_registry_repositories.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,13 +59,11 @@ def resp_get_registry_repository():


@pytest.fixture
def resp_delete_registry_repository(no_content):
def resp_delete_registry_repository():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/registry/repositories/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_releases.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -101,13 +101,11 @@ def resp_update_link():


@pytest.fixture
def resp_delete_link(no_content):
def resp_delete_link():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url=link_id_url,
json=link_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_secure_files.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,13 +65,11 @@ def resp_download_secure_file(binary_content):


@pytest.fixture
def resp_remove_secure_file(no_content):
def resp_remove_secure_file():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/projects/1/secure_files/1",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
2 changes: 0 additions & 2 deletionstests/unit/objects/test_todos.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -66,8 +66,6 @@ def resp_mark_all_as_done():
rsps.add(
method=responses.POST,
url="http://localhost/api/v4/todos/mark_as_done",
json={},
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_topics.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,13 +78,11 @@ def resp_update_topic():


@pytest.fixture
def resp_delete_topic(no_content):
def resp_delete_topic():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url=topic_url,
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_users.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,13 +152,11 @@ def resp_get_user_status():


@pytest.fixture
def resp_delete_user_identity(no_content):
def resp_delete_user_identity():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url="http://localhost/api/v4/users/1/identities/test_provider",
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down
4 changes: 1 addition & 3 deletionstests/unit/objects/test_variables.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -87,13 +87,11 @@ def resp_update_variable():


@pytest.fixture
def resp_delete_variable(no_content):
def resp_delete_variable():
with responses.RequestsMock() as rsps:
rsps.add(
method=responses.DELETE,
url=variables_key_url,
json=no_content,
content_type="application/json",
status=204,
)
yield rsps
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp