Skip to content

Commit 6d5afa5

Browse files
committed
Adding diff file for an IPR url, and some ipr/tests.py tweaks.
- Legacy-Id: 294
1 parent 9bb6d08 commit 6d5afa5

2 files changed

Lines changed: 59 additions & 5 deletions

File tree

ietf/tests.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from django.test import TestCase
1111
from django.conf import settings
1212
from django.db import connection
13-
import ietf.settings
1413
import ietf.urls
1514

1615

@@ -60,7 +59,7 @@ def setUp(self):
6059
# find test urls
6160
self.testtuples = []
6261
self.testurls = []
63-
for root, dirs, files in os.walk(ietf.settings.BASE_DIR):
62+
for root, dirs, files in os.walk(settings.BASE_DIR):
6463
if "testurl.list" in files:
6564
filename = root+"/testurl.list" # yes, this is non-portable
6665
file = open(filename)
@@ -138,9 +137,20 @@ def doUrlsTest(self, lst):
138137
testtext = reduce(response.content)
139138
goodtext = reduce(goodhtml)
140139
if not testtext == goodtext:
141-
print "Diff: %s" % (url)
142-
for line in unified_diff(goodtext, testtext, url, master, lineterm=False):
143-
print line
140+
diff = "\n".join(unified_diff(goodtext, testtext, url, master, lineterm=False))
141+
dfile = "%s/../test/diff/%s" % (settings.BASE_DIR, url.replace("/", "_"))
142+
if os.path.exists(dfile):
143+
dfile = open(dfile)
144+
print "Reading OK diff file:", dfile.name
145+
okdiff = dfile.read()
146+
dfile.close()
147+
else:
148+
okdiff = ""
149+
if diff.strip() == okdiff.strip():
150+
print "OK diff %s" % (url)
151+
else:
152+
print "Diff: %s" % (url)
153+
print diff
144154
except urllib.URLError, e:
145155
print "Failed retrieving master text for comparison: %s" % e
146156

test/diff/_ipr_ipr-657_

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
--- /ipr/ipr-657/ False
2+
+++ https://datatracker.ietf.org/public/ipr_detail_show.cgi?&ipr_id=657 False
3+
@@ -6,6 +6,7 @@False
4+
disclosure ID #590, " France Telecom SA's general license statement
5+
(1) ". Click here to update this IPR disclosure Submitted Date:
6+
November 8, 2005
7+
+
8+
I. Patent Holder/Applicant ("Patent Holder")
9+
10+
Legal Name: France Telecom SA
11+
@@ -43,7 +44,6 @@False
12+
Country: to be confirmed by individual patent declarations
13+
14+
Additional Notes:
15+
-
16+
to be confirmed by individual patent declarations
17+
18+
B. Does this disclosure relate to an unpublished pending patent
19+
@@ -67,12 +67,14 @@False
20+
Licensing information, comments, notes, or URL for further
21+
information:
22+
23+
-NOTE: The individual submitting this template represents and warrants
24+
+No information submitted
25+
+
26+
+Note: The individual submitting this template represents and warrants
27+
that he or she is authorized by the Patent Holder to agree to the
28+
above-selected licensing declaration.
29+
30+
V. Contact Information of Submitter of this Form (if different from
31+
-IETF Participant in Section III above)
32+
+the Contact Information above)
33+
34+
Name: Serge RAES
35+
36+
@@ -90,4 +92,8 @@False
37+
38+
Email: serge.raes@francetelecom.com
39+
40+
+VI. Other Notes:
41+
42+
+No information submitted
43+
+
44+
+

0 commit comments

Comments
 (0)