Пример #1
0
 def setUp(self) -> None:
     super(InvoiceItemPullTest, self).setUp()
     patcher = mock.patch(
         'waldur_mastermind.marketplace_remote.utils.WaldurClient')
     self.client_mock = patcher.start()
     self.fixture = ProjectFixture()
     offering = OfferingFactory(
         type=PLUGIN_NAME,
         secret_options={
             'api_url': 'https://remote-waldur.com/',
             'token': 'valid_token',
             'customer_uuid': 'customer-uuid',
         },
     )
     self.customer = self.fixture.customer
     self.resource = ResourceFactory(project=self.fixture.project,
                                     offering=offering)
     self.resource.backend_id = 'valid-backend-id'
     self.resource.save()
Пример #2
0
 def setUp(self) -> None:
     super().setUp()
     patcher = mock.patch(
         'waldur_mastermind.marketplace_remote.utils.WaldurClient')
     self.client_mock = patcher.start()
     fixture = ProjectFixture()
     offering = OfferingFactory(
         type=PLUGIN_NAME,
         secret_options={
             'api_url': 'https://remote-waldur.com/',
             'token': 'valid_token',
         },
     )
     order = OrderFactory(project=fixture.project,
                          state=Order.States.EXECUTING)
     self.resource = ResourceFactory(project=fixture.project,
                                     offering=offering)
     self.order_item = OrderItemFactory(
         order=order,
         offering=offering,
         resource=self.resource,
         state=OrderItem.States.EXECUTING,
     )