Hi everyone,

I'm writing functional tests in a pyramid application.
Below is the base class I use to write functionals tests.

import pyramid
import unittest
from myapp.models import  DBSession

class FunctionalTests(unittest.TestCase):

    def setUp(self):
        app = pyramid.paster.get_app('test.ini')
        Base.metadata.create_all(DBSession.get_bind())
        from webtest import TestApp
        self.testapp = TestApp(app)

  def tearDown(self):
        del self.testapp
        Base.metadata.drop_all(DBSession.get_bind())
        DBSession.remove()

Everything goes fine when I run my tests using `python setup.py test` (my 
setup.py is a setuptools one)

And everything goes wrong when I run it using the `nosetests` command or 
even the standard unittest discover command: `python -m unittest discover`
In both cases every functional test produces the following error: 

Traceback (most recent call last):
  File "myapp/tests/__init__.py", line 31, in setUp
    app = pyramid.paster.get_app('test.ini')
AttributeError: 'module' object has no attribute 'paster'

I'm quite completely lost on this one. Any idea ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/6-ljzzzCTpoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to