-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(BSR)[API]fix: Sanity check. Test offer creation without WIP_EAN_CREA…
…TION feature activated should succeed without product.
- Loading branch information
1 parent
6154c53
commit 7fde3b5
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,22 @@ def test_created_offer_should_have_is_duo_set_to_true_if_subcategory_is_event_an | |
assert response_dict["isDuo"] == True | ||
assert not offer.product | ||
|
||
@override_features(WIP_EAN_CREATION=False) | ||
def test_create_offer_cd_or_vinyl_without_product_venue_record_store_should_succeed(self, client): | ||
venue = offerers_factories.VenueFactory(venueTypeCode=VenueTypeCode.RECORD_STORE) | ||
offerer = venue.managingOfferer | ||
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]") | ||
|
||
data = { | ||
"name": "Celeste", | ||
"subcategoryId": subcategories.SUPPORT_PHYSIQUE_MUSIQUE_CD.id, | ||
"venueId": venue.id, | ||
"extraData": {"gtl_id": "07000000"}, | ||
} | ||
response = client.with_session_auth("[email protected]").post("/offers/draft", json=data) | ||
|
||
assert response.status_code == 201 | ||
|
||
def test_created_offer_from_product_should_return_product_id(self, client): | ||
venue = offerers_factories.VenueFactory() | ||
offerer = venue.managingOfferer | ||
|