def METHOD_NAME(self):
    draft = WgDraftFactory(
                states=[('draft','active'),('draft-iesg','review-e')],
                ad=PersonFactory(),
                shepherd=EmailFactory(address='shepherd@example.com',person__name='Draft δραφτυ Shepherd'),
                group__parent=GroupFactory(type_id='area'),
                intended_std_level_id = 'ps',
                authors=[EmailFactory().person]
            )
    def get_fields(content):
        self.assertTrue(draft.name + "-" + draft.rev in content)
        for line in content.splitlines():
            if line.startswith(draft.name + "-" + draft.rev):
                return line.split("\t")
    NewRevisionDocEvent.objects.create(doc=draft, rev=draft.rev, type="new_revision", by=draft.ad)
    self.write_draft_file("%s-%s.txt" % (draft.name, draft.rev), 5000)
    self.write_draft_file("%s-%s.pdf" % (draft.name, draft.rev), 5000)
    t = get_fields(all_id2_txt())
    self.assertEqual(t[0], draft.name + "-" + draft.rev)
    self.assertEqual(t[1], "-1")
    self.assertEqual(t[2], "Active")
    self.assertEqual(t[3], "Expert Review")
    self.assertEqual(t[4], "")
    self.assertEqual(t[5], "")
    self.assertEqual(t[6], draft.latest_event(type="new_revision").time.strftime("%Y-%m-%d"))
    self.assertEqual(t[7], draft.group.acronym)
    self.assertEqual(t[8], draft.group.parent.acronym)
    self.assertEqual(t[9], str(draft.ad))
    self.assertEqual(t[10], draft.intended_std_level.name)
    self.assertEqual(t[11], "")
    self.assertEqual(t[12], ".pdf,.txt")
    self.assertEqual(t[13], draft.title)
    author = draft.documentauthor_set.order_by("order").get()
    self.assertEqual(t[14], "%s <%s>" % (author.person.plain_name(), author.email.address))
    self.assertEqual(t[15], "%s <%s>" % (draft.shepherd.person.plain_ascii(), draft.shepherd.address))
    self.assertEqual(t[16], "%s <%s>" % (draft.ad.plain_ascii(), draft.ad.email_address()))
    # test RFC
    draft.set_state(State.objects.get(type="draft", slug="rfc"))
    DocAlias.objects.create(name="rfc1234").docs.add(draft)
    t = get_fields(all_id2_txt())
    self.assertEqual(t[4], "1234")
    # test Replaced
    draft.set_state(State.objects.get(type="draft", slug="repl"))
    RelatedDocument.objects.create(
        relationship=DocRelationshipName.objects.get(slug="replaces"),
        source=Document.objects.create(type_id="draft", rev="00", name="draft-test-replacement"),
        target=draft.docalias.get(name__startswith="draft"))
    t = get_fields(all_id2_txt())
    self.assertEqual(t[5], "draft-test-replacement")
    # test Last Call
    draft.set_state(State.objects.get(type="draft", slug="active"))
    draft.set_state(State.objects.get(type="draft-iesg", slug="lc"))
    e = LastCallDocEvent.objects.create(doc=draft, rev=draft.rev, type="sent_last_call", expires=timezone.now() + datetime.timedelta(days=14), by=draft.ad)
    t = get_fields(all_id2_txt())
    self.assertEqual(t[11], e.expires.strftime("%Y-%m-%d"))