Changing the default email-from address used whentesting, and tweaking the test output
- Legacy-Id: 261
This commit is contained in:
parent
2d9cc036a6
commit
027d471dd0
|
@ -117,15 +117,18 @@ class UrlTestCase(TestCase):
|
||||||
response_count[res] += 1
|
response_count[res] += 1
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
if response_count:
|
||||||
|
print "Response count:"
|
||||||
for res in response_count:
|
for res in response_count:
|
||||||
ind, code = res
|
ind, code = res
|
||||||
print "%4s %s: %s " % (ind, code, response_count[res])
|
print "%-4s %s: %s " % (ind, code, response_count[res])
|
||||||
for res in response_count:
|
for res in response_count:
|
||||||
ind, code = res
|
ind, code = res
|
||||||
self.assertEqual(ind, "OK", "Found %s cases of result code: %s" % (response_count[res], code))
|
self.assertEqual(ind, "OK", "Found %s cases of result code: %s" % (response_count[res], code))
|
||||||
|
|
||||||
def testUrlsList(self):
|
def testUrlsList(self):
|
||||||
lst = [(tuple[0], tuple[1]) for tuple in self.testtuples]
|
lst = [(tuple[0], tuple[1]) for tuple in self.testtuples]
|
||||||
|
print "\nTest listed URLs:"
|
||||||
self.doUrlsTest(lst)
|
self.doUrlsTest(lst)
|
||||||
|
|
||||||
def testUrlsFallback(self):
|
def testUrlsFallback(self):
|
||||||
|
@ -137,4 +140,5 @@ class UrlTestCase(TestCase):
|
||||||
# if there is no variable parts in the url, test it
|
# if there is no variable parts in the url, test it
|
||||||
if re.search("^[-a-z0-9./_]*$", url) and not url in self.testurls and not url.startswith("/admin/"):
|
if re.search("^[-a-z0-9./_]*$", url) and not url in self.testurls and not url.startswith("/admin/"):
|
||||||
lst.append((["200"], url))
|
lst.append((["200"], url))
|
||||||
|
print "\nTest non-listed URLs:"
|
||||||
self.doUrlsTest(lst)
|
self.doUrlsTest(lst)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
DEFAULT_FROM_EMAIL = 'Django IETFdb Test<django-test@tools.ietf.org>'
|
||||||
|
|
||||||
SERVER_MODE = 'test'
|
SERVER_MODE = 'test'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue