def METHOD_NAME(self):
    """Actually 'print' a label, and ensure that the correct information is contained."""
    label_data = """
    {% load barcode %}
    {% load report %}
    <html>
    <!-- Test that the part instance is supplied -->
    part: {{ part.pk }} - {{ part.name }}
    <!-- Test qr data -->
    data: {{ qr_data|safe }}
    <!-- Test InvenTree URL -->
    url: {{ qr_url|safe }}
    <!-- Test image URL generation -->
    image: {% part_image part %}
    <!-- Test InvenTree logo -->
    logo: {% logo_image %}
    </html>
    """
    buffer = io.StringIO()
    buffer.write(label_data)
    template = ContentFile(buffer.getvalue(), "label.html")
    # Construct a label template
    label = PartLabel.objects.create(
        name='test',
        description='Test label',
        enabled=True,
        label=template,
    )
    # Ensure we are in "debug" mode (so the report is generated as HTML)
    InvenTreeSetting.set_setting('REPORT_ENABLE', True, None)
    # Set the 'debug' setting for the plugin
    plugin = registry.get_plugin('inventreelabel')
    plugin.set_setting('DEBUG', True)
    # Print via the API (Note: will default to the builtin plugin if no plugin supplied)
    url = reverse('api-part-label-print', kwargs={'pk': label.pk})
    prt = Part.objects.first()
    part_pk = prt.pk
    part_name = prt.name
    response = self.get(f'{url}?parts={part_pk}', expected_code=200)
    data = json.loads(response.content)
    self.assertIn('file', data)
    # Find the generated file
    output = LabelOutput.objects.last()
    # Open the file and read data
    with open(output.label.path, 'r') as f:
        content = f.read()
    # Test that each element has been rendered correctly
    self.assertIn(f"part: {part_pk} - {part_name}", content)
    self.assertIn(f'data: {{"part": {part_pk}}}', content)
    self.assertIn("http://testserver/part/1/", content)
    self.assertIn("img/blank_image.png", content)
    self.assertIn("img/inventree.png", content)