def METHOD_NAME(self):
    image = Image.new("RGB", (100, 100), (0, 0, 0))
    buffer = BytesIO()
    image.save(buffer, format='JPEG')
    AttachmentFactory.create(_signal=self.signal, file__filename='blah.jpg', file__data=buffer.getvalue())
    jpg_data_uris, att_filenames, user_emails, att_created_ats = \
        DataUriImageEncodeService.get_context_data_images(self.signal, 800)
    self.assertEqual(len(jpg_data_uris), 1)
    self.assertEqual(len(att_filenames), 1)
    self.assertEqual(len(user_emails), 1)
    self.assertEqual(len(att_created_ats), 1)
    self.assertEqual(jpg_data_uris[0][:22], 'data:image/jpg;base64,')
    self.assertGreater(len(jpg_data_uris[0]), 22)