def setUp(self): super(NetworkGetTest, self).setUp() self.fixture = ProjectFixture() self.fixture_2 = ProjectFixture() network_1 = factories.NetworkFactory() network_2 = factories.NetworkFactory() network_3 = factories.NetworkFactory() network_4 = factories.NetworkFactory() factories.CustomerNetworkFactory( network=network_1, customer=self.fixture.customer, ) factories.CustomerNetworkFactory( network=network_2, customer=self.fixture.customer, ) factories.CustomerNetworkFactory( network=network_3, customer=self.fixture_2.customer, ) factories.CustomerNetworkFactory( network=network_4, customer=self.fixture_2.customer, ) self.url = factories.NetworkFactory.get_list_url()
def setUp(self): super(ClusterGetTest, self).setUp() self.fixture = ProjectFixture() self.fixture_2 = ProjectFixture() cluster_1 = factories.ClusterFactory() cluster_2 = factories.ClusterFactory() cluster_3 = factories.ClusterFactory() cluster_4 = factories.ClusterFactory() factories.CustomerClusterFactory( cluster=cluster_1, customer=self.fixture.customer, ) factories.CustomerClusterFactory( cluster=cluster_2, customer=self.fixture.customer, ) factories.CustomerClusterFactory( cluster=cluster_3, customer=self.fixture_2.customer, ) factories.CustomerClusterFactory( cluster=cluster_4, customer=self.fixture_2.customer, ) self.url = factories.ClusterFactory.get_list_url()
def setUp(self): super(DatastoreGetTest, self).setUp() self.fixture = ProjectFixture() self.fixture_2 = ProjectFixture() datastore_1 = factories.DatastoreFactory() datastore_2 = factories.DatastoreFactory() datastore_3 = factories.DatastoreFactory() datastore_4 = factories.DatastoreFactory() factories.CustomerDatastoreFactory( datastore=datastore_1, customer=self.fixture.customer, ) factories.CustomerDatastoreFactory( datastore=datastore_2, customer=self.fixture.customer, ) factories.CustomerDatastoreFactory( datastore=datastore_3, customer=self.fixture_2.customer, ) factories.CustomerDatastoreFactory( datastore=datastore_4, customer=self.fixture_2.customer, ) self.url = factories.DatastoreFactory.get_list_url()
def setUp(self): self.fixture = ProjectFixture() self.url = ServiceSettingsFactory.get_list_url() self.valid_payload = { 'type': 'Azure', 'name': 'Azure service', 'customer': CustomerFactory.get_url(self.fixture.customer), 'options': { 'tenant_id': uuid.uuid4().hex, 'client_id': uuid.uuid4().hex, 'client_secret': uuid.uuid4().hex, 'subscription_id': uuid.uuid4().hex, }, }
def create_service(self): url = factories.ServiceFactory.get_list_url() fixture = ProjectFixture() self.client.force_login(fixture.owner) return self.client.post( url, { 'customer': structure_factories.CustomerFactory.get_url( fixture.customer ), 'username': '******', 'token': 'secret', 'name': 'Test Service', }, )
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()
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, )
def setUp(self): self.fixture = ProjectFixture() self.playbook = factories.PlaybookFactory()
def setUp(self): self.fixture = ProjectFixture() self.url = factories.AzureServiceFactory.get_list_url()
def setUp(self): self.fixture = ProjectFixture() self.url = ServiceSettingsFactory.get_list_url()