From 29b4090bac770a12c2ec76b808ec6a314f845535 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 22 Apr 2012 14:17:27 +0000 Subject: [PATCH] Add an assertion in the test code to explicitly check that we have an OK idnits result. - Legacy-Id: 4298 --- ietf/submit/tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ietf/submit/tests.py b/ietf/submit/tests.py index cbe1b9caf..93cc60136 100644 --- a/ietf/submit/tests.py +++ b/ietf/submit/tests.py @@ -1,4 +1,7 @@ -import datetime, os, shutil +import datetime +import os +import shutil +import re from django.conf import settings from django.contrib.auth.models import User @@ -74,6 +77,7 @@ class SubmitTestCase(django.test.TestCase): submission = IdSubmissionDetail.objects.get(filename=name) self.assertEquals(submission.group_acronym.acronym, "mars") self.assertEquals(submission.tempidauthors_set.count(), 1) + self.assertTrue(re.search('\s+Summary:\s+0\s+errors|No nits found', submission.idnits_message)) author = submission.tempidauthors_set.all()[0] self.assertEquals(author.first_name, "Test Name")