@@ -34,6 +34,19 @@ def test_given_get_request_match_when_decorate_then_return_response(self, http_m
34
34
assert response .status_code == 474
35
35
assert response .headers == _OTHER_HEADERS
36
36
37
+ @HttpMocker ()
38
+ def test_given_delete_request_match_when_decorate_then_return_response (self , http_mocker ):
39
+ http_mocker .delete (
40
+ HttpRequest (_A_URL , headers = _SOME_HEADERS ),
41
+ HttpResponse (_A_RESPONSE_BODY , 204 , _OTHER_HEADERS ),
42
+ )
43
+
44
+ response = requests .delete (_A_URL , headers = _SOME_HEADERS )
45
+
46
+ assert response .text == _A_RESPONSE_BODY
47
+ assert response .status_code == 204
48
+ assert response .headers == _OTHER_HEADERS
49
+
37
50
@HttpMocker ()
38
51
def test_given_loose_headers_matching_when_decorate_then_match (self , http_mocker ):
39
52
http_mocker .get (
@@ -70,6 +83,21 @@ def test_given_multiple_responses_when_decorate_get_request_then_return_response
70
83
assert second_response .text == _ANOTHER_RESPONSE_BODY
71
84
assert second_response .status_code == 2
72
85
86
+ @HttpMocker ()
87
+ def test_given_multiple_responses_when_decorate_delete_request_then_return_response (self , http_mocker ):
88
+ http_mocker .delete (
89
+ HttpRequest (_A_URL , headers = _SOME_HEADERS ),
90
+ [HttpResponse (_A_RESPONSE_BODY , 1 ), HttpResponse (_ANOTHER_RESPONSE_BODY , 2 )],
91
+ )
92
+
93
+ first_response = requests .delete (_A_URL , headers = _SOME_HEADERS )
94
+ second_response = requests .delete (_A_URL , headers = _SOME_HEADERS )
95
+
96
+ assert first_response .text == _A_RESPONSE_BODY
97
+ assert first_response .status_code == 1
98
+ assert second_response .text == _ANOTHER_RESPONSE_BODY
99
+ assert second_response .status_code == 2
100
+
73
101
@HttpMocker ()
74
102
def test_given_multiple_responses_when_decorate_post_request_then_return_response (self , http_mocker ):
75
103
http_mocker .post (
0 commit comments