Skip to content

Commit 6aa2cfc

Browse files
committed
Updated tests to match the submission API info page.
- Legacy-Id: 14127
1 parent 8d3c540 commit 6aa2cfc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

ietf/submit/tests.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,29 +1560,30 @@ def tearDown(self):
15601560
settings.INTERNET_DRAFT_ARCHIVE_DIR = self.saved_archive_dir
15611561

15621562
def post_submission(self, rev, author=None, name=None, group=None, email=None, title=None, year=None):
1563-
15641563
url = urlreverse('ietf.submit.views.api_submit')
1565-
15661564
if author is None:
15671565
author = PersonFactory()
15681566
if name is None:
15691567
slug = re.sub('[^a-z0-9-]+', '', author.ascii_parts()[3].lower())
15701568
name = 'draft-%s-foo' % slug
15711569
if email is None:
15721570
email = author.user.username
1573-
15741571
# submit
15751572
data = {}
15761573
data['xml'], author = submission_file(name, rev, group, 'xml', "test_submission.xml", author=author, email=email, title=title, year=year)
15771574
data['user'] = email
1578-
15791575
r = self.client.post(url, data)
1580-
15811576
return r, author, name
15821577

1583-
def test_api_submit_bad_method(self):
1578+
def test_api_submit_info(self):
15841579
url = urlreverse('ietf.submit.views.api_submit')
15851580
r = self.client.get(url)
1581+
expected = "A simplified draft submission interface, intended for automation"
1582+
self.assertContains(r, expected, status_code=200)
1583+
1584+
def test_api_submit_bad_method(self):
1585+
url = urlreverse('ietf.submit.views.api_submit')
1586+
r = self.client.put(url)
15861587
self.assertEqual(r.status_code, 405)
15871588

15881589
def test_api_submit_ok(self):

0 commit comments

Comments
 (0)