@@ -147,34 +147,6 @@ def test_update_event_stream(
147
147
)
148
148
149
149
150
- @pytest .mark .django_db
151
- def test_update_event_stream_with_mismatched_type (
152
- admin_client : APIClient ,
153
- default_hmac_credential : models .EdaCredential ,
154
- default_organization : models .Organization ,
155
- default_event_stream : models .EventStream ,
156
- ):
157
- invalid_event_stream_type = "mismatched_type"
158
- data_in = {
159
- "name" : "new_test_event_stream" ,
160
- "event_stream_type" : invalid_event_stream_type ,
161
- }
162
- with override_settings (
163
- EVENT_STREAM_BASE_URL = "https://www.example.com/" ,
164
- ):
165
- response = admin_client .patch (
166
- f"{ api_url_v1 } /event-streams/{ default_event_stream .id } /" ,
167
- data = data_in ,
168
- )
169
- assert response .status_code == status .HTTP_400_BAD_REQUEST
170
- assert (
171
- f"The input event stream type { invalid_event_stream_type } does "
172
- "not match with the credential type "
173
- f"{ default_hmac_credential .credential_type .kind } "
174
- in response .data ["non_field_errors" ]
175
- )
176
-
177
-
178
150
@pytest .mark .django_db
179
151
def test_create_event_stream_without_credentials (
180
152
admin_client : APIClient , default_organization : models .Organization
@@ -190,34 +162,6 @@ def test_create_event_stream_without_credentials(
190
162
}
191
163
192
164
193
- @pytest .mark .django_db
194
- def test_create_event_stream_with_mismatched_types (
195
- admin_client : APIClient ,
196
- default_organization : models .Organization ,
197
- default_hmac_credential : models .EdaCredential ,
198
- ):
199
- invalid_event_stream_type = "invalid_type"
200
- data_in = {
201
- "name" : "test_es" ,
202
- "event_stream_type" : invalid_event_stream_type ,
203
- "eda_credential_id" : default_hmac_credential .id ,
204
- "organization_id" : default_organization .id ,
205
- }
206
- with override_settings (
207
- EVENT_STREAM_BASE_URL = "https://www.example.com/" ,
208
- ):
209
- response = admin_client .post (
210
- f"{ api_url_v1 } /event-streams/" , data = data_in
211
- )
212
- assert response .status_code == status .HTTP_400_BAD_REQUEST
213
- assert (
214
- f"The input event stream type { invalid_event_stream_type } does "
215
- "not match with the credential type "
216
- f"{ default_hmac_credential .credential_type .kind } "
217
- in response .data ["non_field_errors" ]
218
- )
219
-
220
-
221
165
@pytest .mark .django_db
222
166
def test_delete_event_stream (
223
167
admin_client : APIClient ,
0 commit comments