def setUp(self):
        self.fixture = ServiceFixture()
        self.project = self.fixture.project
        self.resource = marketplace_factories.ResourceFactory(
            project=self.project)
        self.resource.scope = self.fixture.volume
        self.resource.save()
        resource_offering = self.resource.offering
        resource_offering.scope = self.fixture.service_settings
        resource_offering.save()
        self.order = marketplace_factories.OrderFactory(project=self.project)
        marketplace_factories.OrderItemFactory(resource=self.resource,
                                               order=self.order)
        self.new_project = structure_factories.ProjectFactory()

        self.start_invoice = invoices_factories.InvoiceFactory(
            customer=self.project.customer,
            year=2020,
            month=1,
            state=invoices_models.Invoice.States.PENDING,
        )

        invoices_factories.InvoiceItemFactory(
            invoice=self.start_invoice,
            project=self.project,
            resource=self.resource,
        )

        self.target_invoice = invoices_factories.InvoiceFactory(
            customer=self.new_project.customer,
            year=2020,
            month=1,
            state=invoices_models.Invoice.States.PENDING,
        )
    def trigger_resource_creation(self, **kwargs):
        fixture = azure_fixtures.AzureFixture()
        service_settings = fixture.settings

        attributes = {
            'name': 'database-server',
            'location': azure_factories.LocationFactory.get_url(),
        }
        attributes.update(kwargs)

        offering = marketplace_factories.OfferingFactory(
            type=SQL_SERVER_TYPE, scope=service_settings)
        order = marketplace_factories.OrderFactory(
            project=fixture.project,
            state=marketplace_models.Order.States.EXECUTING,
        )
        order_item = marketplace_factories.OrderItemFactory(
            offering=offering,
            attributes=attributes,
            order=order,
        )

        serialized_order = core_utils.serialize_instance(order_item.order)
        serialized_user = core_utils.serialize_instance(fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)

        order_item.refresh_from_db()
        return order_item
    def setUp(self):
        fixture = slurm_fixtures.SlurmFixture()
        service_settings = fixture.service.settings
        offering = marketplace_factories.OfferingFactory(
            type=PLUGIN_NAME, scope=service_settings)
        plan = marketplace_factories.PlanFactory(offering=offering)
        order = marketplace_factories.OrderFactory(
            project=fixture.project,
            state=marketplace_models.Order.States.EXECUTING)
        order_item = marketplace_factories.OrderItemFactory(
            order=order,
            offering=offering,
            limits={
                component.type: 10
                for component in manager.get_components(PLUGIN_NAME)
            })
        for component in manager.get_components(PLUGIN_NAME):
            component = marketplace_models.OfferingComponent.objects.create(
                offering=offering,
                type=component.type,
                name=component.name,
                measured_unit=component.measured_unit,
            )
            marketplace_models.PlanComponent.objects.create(
                plan=plan,
                component=component,
            )

        # Create SPL
        fixture.spl
        self.fixture = fixture
        self.order_item = order_item
        self.offering = offering
Exemple #4
0
 def setUp(self):
     self.fixture = fixtures.ProjectFixture()
     self.project = self.fixture.project
     self.manager = self.fixture.manager
     self.order = factories.OrderFactory(project=self.project,
                                         created_by=self.manager)
     self.url = factories.OrderFactory.get_url(self.order, 'approve')
Exemple #5
0
    def test_when_order_item_is_approved_openstack_tenant_is_created(self):
        # Arrange
        fixture = package_fixtures.PackageFixture()
        offering = marketplace_factories.OfferingFactory(
            scope=fixture.openstack_service_settings, type=PLUGIN_NAME)
        order = marketplace_factories.OrderFactory(
            state=marketplace_models.Order.States.REQUESTED_FOR_APPROVAL,
            project=fixture.project,
        )
        plan = marketplace_factories.PlanFactory(
            scope=fixture.openstack_template)
        attributes = dict(
            name='My first VPC',
            description='Database cluster',
            user_username='******',
        )
        order_item = marketplace_factories.OrderItemFactory(
            order=order, offering=offering, attributes=attributes, plan=plan)

        serialized_order = core_utils.serialize_instance(order)
        serialized_user = core_utils.serialize_instance(fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)

        # Assert
        order_item.refresh_from_db()
        self.assertTrue(isinstance(order_item.scope, openstack_models.Tenant))
    def trigger_virtual_machine_creation(self, **kwargs):
        fixture = azure_fixtures.AzureFixture()
        service_settings = fixture.settings

        azure_models.SizeAvailabilityZone.objects.create(
            size=fixture.size, location=fixture.location, zone=1)

        attributes = {
            'size': azure_factories.SizeFactory.get_url(fixture.size),
            'image': azure_factories.ImageFactory.get_url(fixture.image),
            'name': 'virtual-machine',
            'location':
            azure_factories.LocationFactory.get_url(fixture.location),
        }
        attributes.update(kwargs)

        offering = marketplace_factories.OfferingFactory(
            type=VIRTUAL_MACHINE_TYPE, scope=service_settings)
        order = marketplace_factories.OrderFactory(
            project=fixture.project,
            state=marketplace_models.Order.States.EXECUTING,
        )
        order_item = marketplace_factories.OrderItemFactory(
            offering=offering,
            attributes=attributes,
            order=order,
        )

        serialized_order = core_utils.serialize_instance(order_item.order)
        serialized_user = core_utils.serialize_instance(fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)

        order_item.refresh_from_db()
        return order_item
 def setUp(self):
     self.fixture = structure_fixtures.ProjectFixture()
     self.project = self.fixture.project
     self.manager = self.fixture.manager
     self.order = factories.OrderFactory(project=self.project,
                                         created_by=self.manager)
     self.offering = factories.OfferingFactory()
Exemple #8
0
    def test_when_order_item_is_approved_openstack_tenant_is_created(self):
        # Arrange
        order = marketplace_factories.OrderFactory(
            state=marketplace_models.Order.States.REQUESTED_FOR_APPROVAL,
            project=self.fixture.project,
        )
        attributes = dict(
            name='My first VPC',
            description='Database cluster',
            user_username='******',
        )
        order_item = marketplace_factories.OrderItemFactory(
            order=order,
            offering=self.offering,
            attributes=attributes,
            plan=self.plan)

        serialized_order = core_utils.serialize_instance(order)
        serialized_user = core_utils.serialize_instance(self.fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)

        # Assert
        order_item.refresh_from_db()
        self.assertTrue(
            isinstance(order_item.resource.scope, openstack_models.Tenant))
 def setUp(self):
     self.fixture = structure_fixtures.ProjectFixture()
     self.project = self.fixture.project
     self.manager = self.fixture.manager
     self.order = factories.OrderFactory(project=self.project,
                                         created_by=self.manager)
     self.order_item = factories.OrderItemFactory(order=self.order)
Exemple #10
0
    def setUp(self):
        self.tenant = openstack_factories.TenantFactory()
        self.project = self.tenant.service_project_link.project
        self.resource = marketplace_factories.ResourceFactory(
            project=self.project)
        self.resource.scope = self.tenant
        self.resource.save()
        self.order = marketplace_factories.OrderFactory(project=self.project)
        marketplace_factories.OrderItemFactory(resource=self.resource,
                                               order=self.order)
        self.new_project = structure_factories.ProjectFactory()

        self.start_invoice = invoices_factories.InvoiceFactory(
            customer=self.project.customer,
            year=2020,
            month=1,
            state=invoices_models.Invoice.States.PENDING,
        )

        invoices_factories.InvoiceItemFactory(
            invoice=self.start_invoice,
            project=self.project,
            scope=self.resource,
        )

        self.target_invoice = invoices_factories.InvoiceFactory(
            customer=self.new_project.customer,
            year=2020,
            month=1,
            state=invoices_models.Invoice.States.PENDING,
        )
Exemple #11
0
 def setUp(self):
     self.fixture = fixtures.ProjectFixture()
     self.project = self.fixture.project
     self.manager = self.fixture.manager
     self.order = factories.OrderFactory(project=self.project,
                                         created_by=self.manager)
     self.order_item_1 = factories.OrderItemFactory(order=self.order)
     self.order_item_2 = factories.OrderItemFactory(order=self.order)
     self.url = factories.OrderFactory.get_url(self.order, 'reject')
 def setUp(self):
     self.fixture = package_fixtures.PackageFixture()
     self.offering = marketplace_factories.OfferingFactory(type=PACKAGE_TYPE)
     self.order = marketplace_factories.OrderFactory(project=self.fixture.project)
     self.order_item = marketplace_factories.OrderItemFactory(
         order=self.order,
         offering=self.offering,
         attributes=dict(user_username='******', user_userpassword='******'),
     )
    def test_resource_is_created_when_order_item_is_processed(self):
        service_settings = rancher_factories.RancherServiceSettingsFactory()
        offering = marketplace_factories.OfferingFactory(
            type=PLUGIN_NAME, scope=service_settings)

        openstack_tenant_factories.FlavorFactory(
            settings=self.fixture.openstack_tenant_service_settings,
            ram=1024 * 8,
            cores=8,
        )
        image = openstack_tenant_factories.ImageFactory(
            settings=self.fixture.openstack_tenant_service_settings)
        openstack_tenant_factories.SecurityGroupFactory(
            name='default',
            settings=self.fixture.openstack_tenant_service_settings)
        service_settings.options['base_image_name'] = image.name
        service_settings.save()

        order = marketplace_factories.OrderFactory(
            project=self.fixture.project, created_by=self.fixture.owner)
        ssh_public_key = SshPublicKeyFactory(user=self.fixture.staff)
        order_item = marketplace_factories.OrderItemFactory(
            order=order,
            offering=offering,
            attributes={
                'name':
                'name',
                'tenant_settings':
                openstack_tenant_factories.
                OpenStackTenantServiceSettingsFactory.get_url(
                    self.fixture.openstack_tenant_service_settings),
                'project':
                ProjectFactory.get_url(self.fixture.project),
                'ssh_public_key':
                SshPublicKeyFactory.get_url(ssh_public_key),
                'nodes': [{
                    'subnet':
                    openstack_tenant_factories.SubNetFactory.get_url(
                        self.fixture.subnet),
                    'system_volume_size':
                    1024,
                    'memory':
                    1,
                    'cpu':
                    1,
                    'roles': ['controlplane', 'etcd', 'worker'],
                }],
            },
        )
        serialized_order = core_utils.serialize_instance(order_item.order)
        serialized_user = core_utils.serialize_instance(self.fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)
        self.assertTrue(
            marketplace_models.Resource.objects.filter(name='name').exists())
        self.assertTrue(
            rancher_models.Cluster.objects.filter(name='name').exists())
 def setUp(self):
     self.fixture = structure_fixtures.ProjectFixture()
     self.project = self.fixture.project
     self.manager = self.fixture.manager
     self.offering = factories.OfferingFactory(
         type='Support.OfferingTemplate')
     self.order = factories.OrderFactory(project=self.project,
                                         created_by=self.manager)
     self.order_item = factories.OrderItemFactory(order=self.order,
                                                  offering=self.offering)
 def setUp(self):
     self.fixture = azure_fixtures.AzureFixture()
     self.virtual_machine = self.fixture.virtual_machine
     self.offering = marketplace_factories.OfferingFactory(type=VIRTUAL_MACHINE_TYPE)
     self.resource = marketplace_factories.ResourceFactory(scope=self.virtual_machine, offering=self.offering)
     self.order = marketplace_factories.OrderFactory(
         project=self.fixture.project,
         state=marketplace_models.Order.States.EXECUTING,
     )
     self.order_item = marketplace_factories.OrderItemFactory(
         resource=self.resource,
         type=marketplace_models.RequestTypeMixin.Types.TERMINATE,
     )
 def setUp(self):
     self.fixture = azure_fixtures.AzureFixture()
     self.sql_server = self.fixture.sql_server
     self.offering = marketplace_factories.OfferingFactory(type=SQL_SERVER_TYPE)
     self.resource = marketplace_factories.ResourceFactory(scope=self.sql_server, offering=self.offering)
     self.order = marketplace_factories.OrderFactory(
         project=self.fixture.project,
         state=marketplace_models.Order.States.EXECUTING,
     )
     self.order_item = marketplace_factories.OrderItemFactory(
         resource=self.resource,
         type=marketplace_models.RequestTypeMixin.Types.TERMINATE,
     )
 def setUp(self):
     self.fixture = openstack_tenant_fixtures.OpenStackTenantFixture()
     self.instance = self.fixture.instance
     self.offering = marketplace_factories.OfferingFactory(type=INSTANCE_TYPE)
     self.resource = marketplace_factories.ResourceFactory(scope=self.instance, offering=self.offering)
     self.order = marketplace_factories.OrderFactory(
         project=self.fixture.project,
         state=marketplace_models.Order.States.EXECUTING,
     )
     self.order_item = marketplace_factories.OrderItemFactory(
         resource=self.resource,
         type=marketplace_models.RequestTypeMixin.Types.TERMINATE,
     )
Exemple #18
0
    def setUp(self):
        self.fixture = slurm_fixtures.SlurmFixture()
        self.allocation = self.fixture.allocation

        self.offering = marketplace_factories.OfferingFactory(type=PLUGIN_NAME)
        self.resource = marketplace_factories.ResourceFactory(scope=self.allocation, offering=self.offering)
        self.order = marketplace_factories.OrderFactory(
            project=self.fixture.project,
            state=marketplace_models.Order.States.EXECUTING,
        )
        self.order_item = marketplace_factories.OrderItemFactory(
            resource=self.resource,
            type=marketplace_models.RequestTypeMixin.Types.TERMINATE,
        )
Exemple #19
0
    def trigger_instance_creation(self, **kwargs):
        image = openstack_tenant_factories.ImageFactory(
            settings=self.service_settings, min_disk=10240, min_ram=1024)
        flavor = openstack_tenant_factories.FlavorFactory(
            settings=self.service_settings)

        subnet_url = openstack_tenant_factories.SubNetFactory.get_url(
            self.fixture.subnet)
        attributes = {
            'flavor':
            openstack_tenant_factories.FlavorFactory.get_url(flavor),
            'image':
            openstack_tenant_factories.ImageFactory.get_url(image),
            'name':
            'Virtual machine',
            'system_volume_size':
            image.min_disk,
            'internal_ips_set': [{
                'subnet': subnet_url
            }],
            'ssh_public_key':
            structure_factories.SshPublicKeyFactory.get_url(
                structure_factories.SshPublicKeyFactory(
                    user=self.fixture.manager)),
        }
        attributes.update(kwargs)

        offering = marketplace_factories.OfferingFactory(
            type=INSTANCE_TYPE, scope=self.service_settings)
        marketplace_factories.OfferingFactory(type=VOLUME_TYPE,
                                              scope=self.service_settings)
        # Ensure that SPL exists
        self.fixture.spl
        order = marketplace_factories.OrderFactory(
            project=self.fixture.project,
            state=marketplace_models.Order.States.EXECUTING,
        )
        order_item = marketplace_factories.OrderItemFactory(
            offering=offering,
            attributes=attributes,
            order=order,
        )

        serialized_order = core_utils.serialize_instance(order_item.order)
        serialized_user = core_utils.serialize_instance(self.fixture.owner)
        marketplace_tasks.process_order(serialized_order, serialized_user)

        order_item.refresh_from_db()
        return order_item
 def setUp(self):
     self.fixture = structure_fixtures.ProjectFixture()
     self.project = self.fixture.project
     self.manager = self.fixture.manager
     self.offering = factories.OfferingFactory(
         type='Support.OfferingTemplate', customer=self.fixture.customer)
     self.order = factories.OrderFactory(project=self.project,
                                         created_by=self.manager)
     resource = factories.ResourceFactory(offering=self.offering)
     self.order_item = factories.OrderItemFactory(
         resource=resource,
         order=self.order,
         offering=self.offering,
         state=models.OrderItem.States.EXECUTING,
     )
Exemple #21
0
 def update_resource_limits(self, resource, new_limits):
     order = marketplace_factories.OrderFactory(
         project=resource.project,
         state=marketplace_models.Order.States.EXECUTING,
     )
     order_item = marketplace_factories.OrderItemFactory(
         order=order,
         offering=self.offering,
         resource=resource,
         type=marketplace_models.OrderItem.Types.UPDATE,
         state=marketplace_models.OrderItem.States.EXECUTING,
         limits=new_limits,
     )
     resource_limit_update_succeeded.send(sender=resource.__class__,
                                          order_item=order_item)
Exemple #22
0
 def setUp(self):
     super(TenantMutateTest, self).setUp()
     self.fixture = package_fixtures.MarketplaceOpenStackFixture()
     self.tenant = self.fixture.openstack_tenant
     self.offering = marketplace_factories.OfferingFactory(type=TENANT_TYPE)
     self.plan = marketplace_factories.PlanFactory(offering=self.offering)
     self.resource = marketplace_factories.ResourceFactory(
         scope=self.tenant,
         offering=self.offering,
         plan=self.plan,
         project=self.fixture.project,
     )
     self.order = marketplace_factories.OrderFactory(
         project=self.fixture.project,
         state=marketplace_models.Order.States.EXECUTING,
     )
Exemple #23
0
    def test_resource_is_created_when_order_item_is_processed(self):
        service = rancher_factories.RancherServiceFactory(
            customer=self.fixture.customer)
        spl = rancher_factories.RancherServiceProjectLinkFactory(
            project=self.fixture.project, service=service)
        service_settings = spl.service.settings
        offering = marketplace_factories.OfferingFactory(
            type=PLUGIN_NAME, scope=service_settings)

        openstack_tenant_factories.FlavorFactory(
            settings=self.fixture.spl.service.settings)
        image = openstack_tenant_factories.ImageFactory(
            settings=self.fixture.spl.service.settings)
        openstack_tenant_factories.SecurityGroupFactory(
            name='default', settings=self.fixture.spl.service.settings)
        service_settings.options['base_image_name'] = image.name
        service_settings.save()

        order = marketplace_factories.OrderFactory(
            project=self.fixture.project, created_by=self.fixture.owner)
        order_item = marketplace_factories.OrderItemFactory(
            order=order,
            offering=offering,
            attributes={
                'name':
                'name',
                'nodes': [{
                    'subnet':
                    openstack_tenant_factories.SubNetFactory.get_url(
                        self.fixture.subnet),
                    'storage':
                    1024,
                    'memory':
                    1,
                    'cpu':
                    1,
                    'roles': ['controlplane', 'etcd', 'worker']
                }],
            })
        serialized_order = core_utils.serialize_instance(order_item.order)
        serialized_user = core_utils.serialize_instance(self.fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)
        self.assertTrue(
            marketplace_models.Resource.objects.filter(name='name').exists())
        self.assertTrue(
            rancher_models.Cluster.objects.filter(name='name').exists())
 def test_update_invoice_if_added_new_offering(self):
     self.order_2 = marketplace_factories.OrderFactory(
         project=self.order_item.order.project)
     self.order_item_2 = marketplace_factories.OrderItemFactory(
         offering=self.offering,
         attributes={
             'name': 'item_name_2',
             'description': 'Description_2'
         },
         plan=self.order_item.plan,
         order=self.order_2)
     self.order_item_process(self.order_item_2)
     invoice = self.get_invoice()
     self.assertTrue(invoice.total)
     self.assertEqual(
         invoice.total,
         (self.plan_component.price * self.plan_component.amount) * 2)
    def setUp(self):
        self.fixture = openstack_tenant_fixtures.OpenStackTenantFixture()

        self.volume = self.fixture.volume
        self.volume.runtime_state = 'available'
        self.volume.save()

        self.offering = marketplace_factories.OfferingFactory(type=VOLUME_TYPE)
        self.resource = marketplace_factories.ResourceFactory(scope=self.volume, offering=self.offering)
        self.order = marketplace_factories.OrderFactory(
            project=self.fixture.project,
            state=marketplace_models.Order.States.EXECUTING,
        )
        self.order_item = marketplace_factories.OrderItemFactory(
            resource=self.resource,
            type=marketplace_models.RequestTypeMixin.Types.TERMINATE,
        )
 def setUp(self):
     super(RequestDeleteTest, self).setUp()
     self.fixture = fixtures.ProjectFixture()
     self.offering = marketplace_factories.OfferingFactory(type=PLUGIN_NAME)
     self.request = support_factories.OfferingFactory(
         state=support_models.Offering.States.TERMINATED)
     self.resource = marketplace_factories.ResourceFactory(
         project=self.fixture.project,
         scope=self.request,
         offering=self.offering,
     )
     self.order = marketplace_factories.OrderFactory(
         project=self.fixture.project,
         state=marketplace_models.Order.States.EXECUTING,
     )
     self.order_item = marketplace_factories.OrderItemFactory(
         resource=self.resource,
         type=marketplace_models.RequestTypeMixin.Types.TERMINATE,
     )
    def test_when_resource_is_updated_invoice_is_updated(self):
        marketplace_signals.resource_creation_succeeded.send(
            sender=self.resource.__class__,
            instance=self.resource,
        )
        self.resource.limits = {
            RAM_TYPE: 10 * 1024,
            CORES_TYPE: 20,
            STORAGE_TYPE: 30 * 1024,
        }
        self.resource.save()
        order = marketplace_factories.OrderFactory(
            project=self.resource.project,
            state=marketplace_models.Order.States.EXECUTING,
        )
        order_item = marketplace_factories.OrderItemFactory(
            order=order,
            offering=self.offering,
            resource=self.resource,
            state=marketplace_models.OrderItem.States.EXECUTING,
            limits=self.resource.limits,
        )
        marketplace_signals.limit_update_succeeded.send(
            sender=self.resource.__class__,
            order_item=order_item,
        )
        invoice_items = invoices_models.InvoiceItem.objects.filter(
            scope=self.resource)

        self.assertEqual(invoice_items.count(), 2)
        self.assertNotEqual(invoice_items.last().unit_price,
                            invoice_items.first().unit_price)
        self.assertEqual(
            invoice_items.last().unit_price,
            self.resource.limits[RAM_TYPE] * self.prices[RAM_TYPE] / 1024 +
            self.resource.limits[CORES_TYPE] * self.prices[CORES_TYPE] +
            self.resource.limits[STORAGE_TYPE] * self.prices[STORAGE_TYPE] /
            1024,
        )
 def order(self):
     return marketplace_factories.OrderFactory(
         state=marketplace_models.Order.States.EXECUTING,
         project=self.project)
    def _create_usage(self, mock_executors):
        order = marketplace_factories.OrderFactory(
            project=self.fixture.project, created_by=self.fixture.owner)
        order_item = marketplace_factories.OrderItemFactory(
            order=order,
            offering=self.offering,
            attributes={
                'name':
                'name',
                'tenant_settings':
                openstack_tenant_factories.
                OpenStackTenantServiceSettingsFactory.get_url(
                    self.fixture.openstack_tenant_service_settings),
                'nodes': [{
                    'subnet':
                    openstack_tenant_factories.SubNetFactory.get_url(
                        self.fixture.subnet),
                    'system_volume_size':
                    1024,
                    'memory':
                    1,
                    'cpu':
                    1,
                    'roles': ['controlplane', 'etcd', 'worker'],
                }],
            },
        )
        serialized_order = core_utils.serialize_instance(order_item.order)
        serialized_user = core_utils.serialize_instance(self.fixture.staff)
        marketplace_tasks.process_order(serialized_order, serialized_user)
        self.assertTrue(
            marketplace_models.Resource.objects.filter(name='name').exists())
        self.assertTrue(
            rancher_models.Cluster.objects.filter(name='name').exists())

        self.cluster = rancher_models.Cluster.objects.get(name='name')
        self.cluster.backend_id = 'cluster_backend_id'
        self.cluster.save()

        create_node_task = tasks.CreateNodeTask()
        create_node_task.execute(
            mock_executors.ClusterCreateExecutor.execute.mock_calls[0][1]
            [0].node_set.first(),
            user_id=mock_executors.ClusterCreateExecutor.execute.mock_calls[0]
            [2]['user'].id,
        )
        self.assertTrue(
            self.cluster.node_set.filter(cluster=self.cluster).exists())

        today = datetime.date.today()
        self.resource = marketplace_models.Resource.objects.get(
            scope=self.cluster)
        self.plan_period = marketplace_models.ResourcePlanPeriod.objects.create(
            start=today,
            end=None,
            resource=self.resource,
            plan=self.plan,
        )
        invoices_tasks.create_monthly_invoices()
        tasks.pull_cluster_nodes(self.cluster.id)
        utils.update_cluster_nodes_states(self.cluster.id)
Exemple #30
0
 def order(self):
     return marketplace_factories.OrderFactory(project=self.project)