def METHOD_NAME(self):
    with self.assertRaises(ValueError):
        Attachment.objects.create(instance=self.instance, media_file="a" * 300)
    pre_count = Attachment.objects.count()
    Attachment.objects.create(instance=self.instance, media_file="a" * 150)
    self.assertEqual(pre_count + 1, Attachment.objects.count())