Print NNTP server welcome string as info

This commit is contained in:
Bastian Kleineidam 2009-03-06 20:57:35 +01:00
parent 2bce793bbc
commit 0b5f525f76
2 changed files with 6 additions and 0 deletions

View file

@ -92,6 +92,7 @@ class NntpUrl (urlbase.UrlBase):
tag=WARN_NNTP_BUSY)
if log.is_debug(LOG_CHECK):
nntp.set_debuglevel(1)
self.add_info(nntp.getwelcome())
return nntp
def can_get_content (self):

View file

@ -23,6 +23,8 @@ from . import LinkCheckTest
# Change from time to time, as servers tend to get invalid.
NNTP_SERVER = "freenews.netfront.net"
# info string returned by news server
NNTP_INFO = u"200 news.netfront.net InterNetNews NNRP server INN 2.4.6 (20090304 snapshot) ready (posting ok)."
class TestNews (LinkCheckTest):
@ -99,6 +101,7 @@ class TestNews (LinkCheckTest):
u"url %s" % url,
u"cache key %s" % url,
u"real url %s" % url,
u"info %s" % NNTP_INFO,
u"info News group comp.lang.python found.",
u"valid",
]
@ -113,6 +116,7 @@ class TestNews (LinkCheckTest):
u"url %s" % url,
u"cache key %s" % url,
u"real url %s" % url,
u"info %s" % NNTP_INFO,
u"info News group comp.lang.python found.",
u"valid",
]
@ -136,6 +140,7 @@ class TestNews (LinkCheckTest):
u"url %s" % url,
u"cache key %s" % url,
u"real url %s" % url,
u"info %s" % NNTP_INFO,
u"warning No newsgroup specified in NNTP URL.",
u"valid",
]