-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Running the zopyx.smartprintng.server tests with Repoze 1.2a9:

Calling the index() view no longer returns a response object with
a status attribute:


>
/data/develop/repository/svn.zope.org/zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/tests.py(96)test_index()
- -> self.assertEqual(result.status, '200 OK')
(Pdb) list
 91          def test_index(self):
 92              from zopyx.smartprintng.server.views import index
 93              context = Server()
 94              request = testing.DummyRequest()
 95              result = index(context, request)
 96  ->            self.assertEqual(result.status, '200 OK')
 97              body = result.app_iter[0]
 98              self.assertEqual(len(result.headerlist), 2)
 99              self.assertEqual(result.headerlist[0],
100                               ('Content-Type', 'text/html;
charset=UTF-8'))
101              self.assertEqual(result.headerlist[1], ('Content-Length',
(Pdb) print result
<zopyx.smartprintng.server.views.index object at 0x1c57590>

So 'result' is now the view class itself?


 36 @bfg_view(for_=Server, request_method='GET', permission='read')
 37 class index(object):
 38     """ The default view providing some system information """
 39
 40     def __init__(self, context, request):
 41         self.context = context
 42         self.request = request
 43
 44     def __call__(self):
 45         converters = self.context.availableConverters()
 46         version =
pkg_resources.require('zopyx.smartprintng.server')[0].versionĀ·
 47         return render_template_to_response('templates/index.pt',
 48                                            context=self.context,
 49                                            converters=converters,
 50                                            request=self.request,
 51                                            version=version,
 52                                           
project='zopyx.smartprintng.server')

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks/f9gACgkQCJIWIbr9KYxEpACfWsrY42pivfgSJJX5d0GtL8fC
dWgAoJu2McNlFv7BlTmDC4hz9oWttwTA
=Cibm
-----END PGP SIGNATURE-----

<<attachment: lists.vcf>>

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to