Skip to content

Commit

Permalink
(BSR)[API]fix: Sanity check. Test offer creation without WIP_EAN_CREA…
Browse files Browse the repository at this point in the history
…TION feature activated should succeed without product.
  • Loading branch information
pcharlet-pass committed Sep 19, 2024
1 parent 6154c53 commit 7fde3b5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions api/tests/routes/pro/post_draft_offer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fde3b5

Please sign in to comment.