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

Commite3035a7

Browse files
nejchJohnVillalovos
authored andcommitted
chore(api): temporarily remove topic delete endpoint
It is not yet available upstream.
1 parent49af15b commite3035a7

File tree

5 files changed

+3
-33
lines changed

5 files changed

+3
-33
lines changed

‎docs/gl_objects/topics.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,3 @@ Update a topic::
3939

4040
# or
4141
gl.topics.update(topic_id, {"description": "My new topic"})
42-
43-
Delete a topic::
44-
45-
topic.delete()
46-
47-
# or
48-
gl.topics.delete(topic_id)

‎gitlab/v4/objects/topics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
fromgitlabimporttypes
44
fromgitlab.baseimportRequiredOptional,RESTManager,RESTObject
5-
fromgitlab.mixinsimportCRUDMixin,ObjectDeleteMixin,SaveMixin
5+
fromgitlab.mixinsimportCreateMixin,RetrieveMixin,SaveMixin,UpdateMixin
66

77
__all__= [
88
"Topic",
99
"TopicManager",
1010
]
1111

1212

13-
classTopic(SaveMixin,ObjectDeleteMixin,RESTObject):
13+
classTopic(SaveMixin,RESTObject):
1414
pass
1515

1616

17-
classTopicManager(CRUDMixin,RESTManager):
17+
classTopicManager(CreateMixin,RetrieveMixin,UpdateMixin,RESTManager):
1818
_path="/topics"
1919
_obj_cls=Topic
2020
_create_attrs=RequiredOptional(

‎tests/functional/api/test_topics.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,3 @@ def test_topics(gl):
1616

1717
updated_topic=gl.topics.get(topic.id)
1818
assertupdated_topic.description==topic.description
19-
20-
topic.delete()
21-
assertnotgl.topics.list()

‎tests/functional/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ def reset_gitlab(gl):
2424
fordeploy_tokeningroup.deploytokens.list():
2525
deploy_token.delete()
2626
group.delete()
27-
fortopicingl.topics.list():
28-
topic.delete()
2927
forvariableingl.variables.list():
3028
variable.delete()
3129
foruseringl.users.list():

‎tests/unit/objects/test_topics.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ def resp_update_topic():
7575
yieldrsps
7676

7777

78-
@pytest.fixture
79-
defresp_delete_topic(no_content):
80-
withresponses.RequestsMock()asrsps:
81-
rsps.add(
82-
method=responses.DELETE,
83-
url=topic_url,
84-
json=no_content,
85-
content_type="application/json",
86-
status=204,
87-
)
88-
yieldrsps
89-
90-
9178
deftest_list_topics(gl,resp_list_topics):
9279
topics=gl.topics.list()
9380
assertisinstance(topics,list)
@@ -112,8 +99,3 @@ def test_update_topic(gl, resp_update_topic):
11299
topic.name=new_name
113100
topic.save()
114101
asserttopic.name==new_name
115-
116-
117-
deftest_delete_topic(gl,resp_delete_topic):
118-
topic=gl.topics.get(1,lazy=True)
119-
topic.delete()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp