Ask Your Question

Issue when running tempest: AttributeError

asked 2013-05-13 16:21:37 -0500

robparrott gravatar image

Hi Folks,

I'm working on a reproducible build for Grizzly, and want to run a set of tempest tests at the end of the build process. I'm pulling the grizzly branch of tempest from GitHub, and configure tempest.conf. When I run a set of tests, some work, but then I get failures which seem to be related to python and the nose, and not OpenStack. Here's an example error:

ERROR: Failure: AttributeError ('module' object has no attribute 'attr')
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nose/", line 364, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.6/site-packages/nose/", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.6/site-packages/nose/", line 84, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/tmp/tempest/tempest/tests/identity/admin/", line 24, in <module>
    class TenantsTestJSON(base.BaseIdentityAdminTest):
  File "/tmp/tempest/tempest/tests/identity/admin/", line 61, in TenantsTestJSON
  File "/tmp/tempest/tempest/", line 46, in decorator
    return nose.plugins.attrib.attr(*args, **kwargs)(f)
AttributeError: 'module' object has no attribute 'attr'

From poking around in the code, this seems to occur for all tests that are decorated with


and occurs on the "else: return ..." in this decorator function:

def attr(*args, **kwargs):

    def decorator(f):
        testtool_attributes = ('smoke')

        if 'type' in kwargs and kwargs['type'] in testtool_attributes:
            return nose.plugins.attrib.attr(*args, **kwargs)(
            return nose.plugins.attrib.attr(*args, **kwargs)(f)

    return decorator

However, some tests that are decorated with @attr(typr='smoke') appear to work OK.

Can anyone provide a hint on what I'm missing here?

System is CentOS 6.4 using RDO packages. Python is 2.6 and nose is python-nose-0.10.4-3.1.el6.noarch

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-05-14 10:00:43 -0500

robparrott gravatar image

FWIW, this was due to an old version of nosetests, which didn't include the "" module. It may be useful for the tempest folks to make the version requirements more explicit.

edit flag offensive delete link more



thanks for posting the solution here. Have you already filed a bug on

smaffulli gravatar imagesmaffulli ( 2013-05-15 20:48:35 -0500 )edit

answered 2015-11-05 22:12:22 -0500

shashidhar gravatar image

Please try "Kilo" release of OpenStack, which is latest and this may not have the issues that you have reported. Choose the stable version from the git say for example “Juno” or any latest release.

$ git clone -b stable/juno

Cloning into 'devstack'... remote: Counting objects: 28160, done. remote: Compressing objects: 100% (14/14), done. remote: Total 28160 (delta 3), reused 0 (delta 0), pack-reused 28146 Receiving objects: 100% (28160/28160), 9.59 MiB | 6.00 KiB/s, done. Resolving deltas: 100% (19543/19543), done. Checking connectivity... done.

edit flag offensive delete link more


I have run refstack bucket and still see the same behavior as described here. If commenting out the @attr(type='negative'), then those test cases would run fine. Any additional suggestion? Thx.

tuannguyen gravatar imagetuannguyen ( 2016-02-18 10:40:29 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-05-13 16:21:37 -0500

Seen: 1,455 times

Last updated: Nov 05 '15