def test_one_service_plan_in_offering(self, response):
     offering = ServiceOffering._from_response(response, client=mock.Mock())
     assert len(offering.service_plans) == 1
     plan = offering.service_plans[0]
     assert plan.id == PLAN_0_ID
     assert plan.name == PLAN_0_NAME
     assert plan.description == PLAN_0_DESCRIPTION
 def test_one_service_plan_in_offering(self, response):
     offering = ServiceOffering._from_response(response, client=mock.Mock())
     assert len(offering.service_plans) == 2
     plan_0 = next(p for p in offering.service_plans if p.id == PLAN_0_ID)
     plan_1 = next(p for p in offering.service_plans if p.id == PLAN_1_ID)
     assert plan_0.id == PLAN_0_ID
     assert plan_0.name == PLAN_0_NAME
     assert plan_0.description == PLAN_0_DESCRIPTION
     assert plan_1.id == PLAN_1_ID
     assert plan_1.name == PLAN_1_NAME
     assert plan_1.description == PLAN_1_DESCRIPTION
 def test_offering_from_response(self, response):
     offering = ServiceOffering._from_response(response, client=mock.Mock())
     assert offering.label == OFFERING_LABEL
     assert offering.id == OFFERING_ID