Skip to content

Commit 027d471

Browse files
committed
Changing the default email-from address used whentesting, and tweaking the test output
- Legacy-Id: 261
1 parent 2d9cc03 commit 027d471

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

ietf/tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,18 @@ def doUrlsTest(self, lst):
117117
response_count[res] += 1
118118
else:
119119
pass
120+
if response_count:
121+
print "Response count:"
120122
for res in response_count:
121123
ind, code = res
122-
print "%4s %s: %s " % (ind, code, response_count[res])
124+
print "%-4s %s: %s " % (ind, code, response_count[res])
123125
for res in response_count:
124126
ind, code = res
125127
self.assertEqual(ind, "OK", "Found %s cases of result code: %s" % (response_count[res], code))
126128

127129
def testUrlsList(self):
128130
lst = [(tuple[0], tuple[1]) for tuple in self.testtuples]
131+
print "\nTest listed URLs:"
129132
self.doUrlsTest(lst)
130133

131134
def testUrlsFallback(self):
@@ -137,4 +140,5 @@ def testUrlsFallback(self):
137140
# if there is no variable parts in the url, test it
138141
if re.search("^[-a-z0-9./_]*$", url) and not url in self.testurls and not url.startswith("/admin/"):
139142
lst.append((["200"], url))
143+
print "\nTest non-listed URLs:"
140144
self.doUrlsTest(lst)

test/settings_local_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
DEFAULT_FROM_EMAIL = 'Django IETFdb Test<django-test@tools.ietf.org>'
12

23
SERVER_MODE = 'test'
34

0 commit comments

Comments
 (0)