nosetests
- From:
- Alasdair Macmillan
- Date:
- 2010-10-06 @ 20:37
Okay I ran the 30 second tests and when I run 'nosetests; I get this:
2010-10-06 15:36:23,337 - routing - DEBUG - Matched 'tester@localhost'
against START.
2010-10-06 15:36:23,337 - routing - DEBUG - Message to
set(['tester@localhost']) was handled by app.handlers.sample.START
2010-10-06 15:36:23,338 - routing - DEBUG - Matched 'tester@localhost'
against FORWARD.
E2010-10-06 15:36:23,358 - routing - DEBUG - Matched
'tester@badplace.notinterwebs' against START.
2010-10-06 15:36:23,358 - routing - DEBUG - Message to
set(['tester@badplace.notinterwebs']) was handled by
app.handlers.sample.START
2010-10-06 15:36:23,358 - routing - DEBUG - Matched
'tester@badplace.notinterwebs' against FORWARD.
E
======================================================================
ERROR: !!!!!! YOU MUST CONFIGURE YOUR config/settings.py OR THIS WILL FAIL !!!!!!
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/almacmillan/lib/python2.6/nose-0.11.4-py2.6.egg/nose/case.py", line
186, in runTest
self.test(*self.arg)
File
"/home/almacmillan/webapps/futon/mailserver/tests/handlers/open_relay_tests.py",
line 19, in test_forwards_relay_host
client.say("tester@localhost", "Test that forward works.", "tester@localhost")
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/testing.py",
line 139, in say
self.deliver(To, self.From, Subject or self.Subject, Body)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/testing.py",
line 167, in deliver
routing.Router.deliver(msg)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/routing.py",
line 360, in deliver
self.call_safely(func, message, matchkw)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/routing.py",
line 376, in call_safely
func(message, **kwargs)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/routing.py",
line 495, in routing_wrapper
next_state = func(message, *args, **kw)
File
"/home/almacmillan/webapps/futon/mailserver/app/handlers/sample.py", line
25, in FORWARD
relay.deliver(message)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/server.py",
line 114, in deliver
relay_host.sendmail(sender, recipient, str(message))
File "/usr/local/lib/python2.6/smtplib.py", line 710, in sendmail
(code,resp) = self.data(msg)
File "/usr/local/lib/python2.6/smtplib.py", line 479, in data
(code,msg)=self.getreply()
File "/usr/local/lib/python2.6/smtplib.py", line 340, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed
======================================================================
ERROR: But, make sure that mail NOT for test.com gets dropped silently.
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/almacmillan/lib/python2.6/nose-0.11.4-py2.6.egg/nose/case.py", line
186, in runTest
self.test(*self.arg)
File
"/home/almacmillan/webapps/futon/mailserver/tests/handlers/open_relay_tests.py",
line 27, in test_drops_open_relay_messages
client.say("tester@badplace.notinterwebs", "Relay should not happen")
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/testing.py",
line 139, in say
self.deliver(To, self.From, Subject or self.Subject, Body)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/testing.py",
line 167, in deliver
routing.Router.deliver(msg)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/routing.py",
line 360, in deliver
self.call_safely(func, message, matchkw)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/routing.py",
line 376, in call_safely
func(message, **kwargs)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/routing.py",
line 495, in routing_wrapper
next_state = func(message, *args, **kw)
File
"/home/almacmillan/webapps/futon/mailserver/app/handlers/sample.py", line
25, in FORWARD
relay.deliver(message)
File
"/home/almacmillan/lib/python2.6/lamson-1.0-py2.6.egg/lamson/server.py",
line 114, in deliver
relay_host.sendmail(sender, recipient, str(message))
File "/usr/local/lib/python2.6/smtplib.py", line 710, in sendmail
(code,resp) = self.data(msg)
File "/usr/local/lib/python2.6/smtplib.py", line 479, in data
(code,msg)=self.getreply()
File "/usr/local/lib/python2.6/smtplib.py", line 340, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed
----------------------------------------------------------------------
Ran 2 tests in 0.278s
FAILED (errors=2)
What does this mean and what can I do about it?
Kind thanks AL
Re: [lamson] nosetests
- From:
- Zed A. Shaw
- Date:
- 2010-10-06 @ 22:58
On Wed, Oct 06, 2010 at 09:37:59PM +0100, Alasdair Macmillan wrote:
> Okay I ran the 30 second tests and when I run 'nosetests; I get this:
> ======================================================================
> ERROR: !!!!!! YOU MUST CONFIGURE YOUR config/settings.py OR THIS WILL
FAIL !!!!!!
There ya go ^^^^^ go into your config/settings.py and fix it up so the
test passes.
--
Zed A. Shaw
http://zedshaw.com/