Adding diff file for an IPR url, and some ipr/tests.py tweaks.

- Legacy-Id: 294
This commit is contained in:
Henrik Levkowetz 2007-06-10 18:19:42 +00:00
parent 9bb6d08ed2
commit 6d5afa514a
2 changed files with 59 additions and 5 deletions

View file

@ -10,7 +10,6 @@ import django.test.simple
from django.test import TestCase
from django.conf import settings
from django.db import connection
import ietf.settings
import ietf.urls
@ -60,7 +59,7 @@ class UrlTestCase(TestCase):
# find test urls
self.testtuples = []
self.testurls = []
for root, dirs, files in os.walk(ietf.settings.BASE_DIR):
for root, dirs, files in os.walk(settings.BASE_DIR):
if "testurl.list" in files:
filename = root+"/testurl.list" # yes, this is non-portable
file = open(filename)
@ -138,9 +137,20 @@ class UrlTestCase(TestCase):
testtext = reduce(response.content)
goodtext = reduce(goodhtml)
if not testtext == goodtext:
print "Diff: %s" % (url)
for line in unified_diff(goodtext, testtext, url, master, lineterm=False):
print line
diff = "\n".join(unified_diff(goodtext, testtext, url, master, lineterm=False))
dfile = "%s/../test/diff/%s" % (settings.BASE_DIR, url.replace("/", "_"))
if os.path.exists(dfile):
dfile = open(dfile)
print "Reading OK diff file:", dfile.name
okdiff = dfile.read()
dfile.close()
else:
okdiff = ""
if diff.strip() == okdiff.strip():
print "OK diff %s" % (url)
else:
print "Diff: %s" % (url)
print diff
except urllib.URLError, e:
print "Failed retrieving master text for comparison: %s" % e

44
test/diff/_ipr_ipr-657_ Normal file
View file

@ -0,0 +1,44 @@
--- /ipr/ipr-657/ False
+++ https://datatracker.ietf.org/public/ipr_detail_show.cgi?&ipr_id=657 False
@@ -6,6 +6,7 @@False
disclosure ID #590, " France Telecom SA's general license statement
(1) ". Click here to update this IPR disclosure Submitted Date:
November 8, 2005
+
I. Patent Holder/Applicant ("Patent Holder")
Legal Name: France Telecom SA
@@ -43,7 +44,6 @@False
Country: to be confirmed by individual patent declarations
Additional Notes:
-
to be confirmed by individual patent declarations
B. Does this disclosure relate to an unpublished pending patent
@@ -67,12 +67,14 @@False
Licensing information, comments, notes, or URL for further
information:
-NOTE: The individual submitting this template represents and warrants
+No information submitted
+
+Note: The individual submitting this template represents and warrants
that he or she is authorized by the Patent Holder to agree to the
above-selected licensing declaration.
V. Contact Information of Submitter of this Form (if different from
-IETF Participant in Section III above)
+the Contact Information above)
Name: Serge RAES
@@ -90,4 +92,8 @@False
Email: serge.raes@francetelecom.com
+VI. Other Notes:
+No information submitted
+
+