Use testtools for base test class

Bug #1179009 reported by Monty Taylor
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Angus Salkeld
Cinder
Fix Released
Undecided
Michael Kerrin
Glance
Fix Released
Undecided
Unassigned
OpenStack DBaaS (Trove)
In Progress
Low
Nikhil Manchanda
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Wu Wenxiang
OpenStack Identity (keystone)
Fix Released
Wishlist
Viktor Serhieiev
OpenStack Object Storage (swift)
In Progress
Wishlist
Kuo-tung Kao (jelly)
Sahara
Fix Released
Medium
Andrew Lazarev
Zuul
New
Undecided
Unassigned
git-review
Fix Committed
High
Dina Belova
oslo-incubator
Fix Released
Undecided
Unassigned
python-ceilometerclient
Fix Released
Undecided
Angus Salkeld
python-heatclient
Fix Released
Undecided
Unassigned
tempest
Fix Released
Undecided
Unassigned

Bug Description

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

The testtools library has been chosen as the project-wide testing base
class. It works across 2.6 and 2.7 and is a library that aims to develop
new testing features before inclusion in the standard library. It
enforces a few elements of correctness, such as always upcalling
standard methods, as well as providing hooks for features such as detail
collection and fixtures with cleanup.

 affects ceilometer
 affects cinder
 affects git-review
 affects glance
 affects horizon
 affects keystone
 affects openstack-ci
 affects oslo
 affects python-ceilometerclient
 affects python-heatclient
 affects reddwarf
 affects swift
 affects tempest
 affects zuul
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlGObtcACgkQ2Jv7/VK1RgH0AgCg8uEx2Za2rXscfse508hhog7p
OrMAoK2LacTVUNhbe6R6AxO8XXXB1PWv
=QEI2
-----END PGP SIGNATURE-----

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

I will be interested to see how integrating this into Django's test runner works out for Horizon. I'm not opposed to it, but suspect it may not be trivial.

Changed in horizon:
importance: Undecided → Wishlist
milestone: none → havana-1
status: New → Triaged
Revision history for this message
Angus Salkeld (asalkeld) wrote :
Changed in python-ceilometerclient:
assignee: nobody → Angus Salkeld (asalkeld)
status: New → Fix Committed
Revision history for this message
Angus Salkeld (asalkeld) wrote :
Changed in ceilometer:
assignee: nobody → Angus Salkeld (asalkeld)
status: New → Fix Committed
Changed in horizon:
milestone: havana-1 → havana-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/30291

Changed in cinder:
assignee: nobody → Michael Kerrin (michael-kerrin-w)
status: New → In Progress
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-1
status: Fix Committed → Fix Released
James E. Blair (corvus)
Changed in openstack-ci:
assignee: nobody → Monty Taylor (mordred)
importance: Undecided → Medium
milestone: none → havana
status: New → Triaged
Revision history for this message
Attila Fazekas (afazekas) wrote :

It is a base class since long.

With python2.6 when I use nosetests the skip exceptions from setUpClasses are considered as ERRORs instead of skip.

Changed in tempest:
status: New → Fix Released
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Wishlist
status: New → Triaged
Changed in horizon:
milestone: havana-2 → havana-3
Revision history for this message
Angus Salkeld (asalkeld) wrote :
Changed in python-heatclient:
status: New → Fix Committed
Changed in keystone:
assignee: nobody → Victor Sergeyev (vsergeyev)
Changed in keystone:
status: Triaged → In Progress
Monty Taylor (mordred)
no longer affects: openstack-ci
Jeremy Stanley (fungi)
Changed in git-review:
assignee: nobody → Dina Belova (dbelova)
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Ben Nemec (bnemec) wrote :

As near as I can tell, this is already the case in all of the Oslo projects. Marking as fix committed instead of invalid since I'm not sure whether this was done before or after this bug was opened.

Changed in oslo:
status: New → Fix Committed
Changed in horizon:
milestone: havana-3 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/39064
Committed: http://github.com/openstack/keystone/commit/221851c8ac78362418dc3e5c3f5659f78c012c35
Submitter: Jenkins
Branch: master

commit 221851c8ac78362418dc3e5c3f5659f78c012c35
Author: Victor Sergeyev <email address hidden>
Date: Mon Jul 29 09:42:50 2013 +0300

    Use testtools as base test class.

    Minor tests refactoring due to use testtools:
     - added missed setUp() and tearDown() to call these functions in
       base test case.
     - removed some superfluous tearDown() calls.
     - moved test_crud_inherited_role_grants_failed_if_disabled() method
       to separate class.

    Fixes for python 2.6 enviroment:
     - replaced `with self.assertRaises(Exception): foo()` to
       `self.assertRaises(Exception, foo)
     - added to safe_repr(), assertDictEqual() and assertRaisesRegexp() methods
       to TestCase() class in keystone/test.py

    Fixes bug 1179009

    Change-Id: Iea67ad10d02db82fc8ed79b1096ddb5233925bfd

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → havana-3
status: Fix Committed → Fix Released
Revision history for this message
Yang Yu (yuyangbj) wrote : I will be on vacation from 9/5 to 9/15, urgent call: 13811509950

I will be out of the office starting 2013-09-05 and will not return until
2013-09-15.

I will be on my marriage leave from 9/5 to 9/15, for any urgent issue
please call me before 9/7.

For daily work, please ask my scrum master Zhu Zhu for help.
For glance issue, please ask glance SME Feilong Wang for help.
For defect report, there will be no report next week.

Changed in python-heatclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: havana-3 → 2013.2
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-1 → 2013.2
Thierry Carrez (ttx)
Changed in keystone:
milestone: havana-3 → 2013.2
Changed in trove:
importance: Undecided → Low
Changed in trove:
importance: Low → Medium
status: New → Triaged
Changed in trove:
assignee: nobody → Denis M. (dmakogon)
status: Triaged → In Progress
Revision history for this message
Steve Kowalik (stevenk) wrote :

Glance uses testrepository as of commit d7f1221684ea3c958f0a382764074adb5ee6cbcf.

Changed in glance:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-rc1 → 2014.1
Denis M. (dmakogon)
Changed in trove:
assignee: Denis M. (dmakogon) → nobody
status: In Progress → New
Changed in sahara:
importance: Undecided → Medium
milestone: none → juno-1
status: New → Triaged
assignee: nobody → Andrew Lazarev (alazarev)
Changed in python-saharaclient:
importance: Undecided → Medium
milestone: none → 0.7.1
status: New → Triaged
Changed in sahara:
status: Triaged → In Progress
Changed in python-saharaclient:
assignee: nobody → Andrew Lazarev (alazarev)
Revision history for this message
Andrew Lazarev (alazarev) wrote :

python-saharaclient uses testtools from day one.

Changed in python-saharaclient:
assignee: Andrew Lazarev (alazarev) → nobody
no longer affects: python-saharaclient
Changed in sahara:
milestone: juno-1 → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/96979
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=95e1c2f00bda95ed49f13879a83ca4fcbf054a1a
Submitter: Jenkins
Branch: master

commit 95e1c2f00bda95ed49f13879a83ca4fcbf054a1a
Author: Andrew Lazarev <email address hidden>
Date: Fri May 30 16:38:06 2014 -0700

    Migrated unit tests to testtools

    Main changes:
    * testtools checks that base setUp is called
    * assertRaises doesn't return context
    * testtools inherits from unittest (not unittest2) and doesn't have
      specific compare functions in py2.6

    Notes:
    * Integration tests will be tracked separately (bp: it-testtools)
    * Migration to oslotest will be tracked separately (bp: oslotest)
    * bug #1325108 is out of scope of this CR

    Implements blueprint: ut-testtools
    Closes-Bug: #1179009

    Change-Id: I85f0ea1aa972ff68ddd1817ec936a8c26312f041

Changed in sahara:
status: In Progress → Fix Committed
Revision history for this message
Jeremy Stanley (fungi) wrote :

Can't seem to set this to fix-released for git-review (even via SMTP API), so commenting here instead.

Thierry Carrez (ttx)
Changed in sahara:
status: Fix Committed → Fix Released
Denis M. (dmakogon)
Changed in trove:
status: New → Triaged
Thierry Carrez (ttx)
Changed in sahara:
milestone: juno-2 → 2014.2
Amrith Kumar (amrith)
Changed in trove:
importance: Medium → Wishlist
Changed in horizon:
assignee: nobody → Ekaterina Chernova (efedorova)
Changed in horizon:
assignee: Ekaterina Chernova (efedorova) → Wu Wenxiang (wu-wenxiang)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/157366

Changed in trove:
assignee: nobody → Wu Wenxiang (wu-wenxiang)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/152869
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=8e8c084847280f3f8e975910b498ed9fbb3a69c8
Submitter: Jenkins
Branch: master

commit 8e8c084847280f3f8e975910b498ed9fbb3a69c8
Author: Wu Wenxiang <wu.wenxiang@99cloud.net>
Date: Wed Feb 4 03:58:25 2015 -0800

    Replace unittest2 with testtools

    Remove unittest2 from test-requirements.txt
    Replace unittest2 with testtools in files:
    * openstack_dashboard/test/api_tests/keystone_rest_tests.py
    * openstack_dashboard/test/api_tests/rest_util_tests.py
    * openstack_dashboard/test/api_tests/nova_rest_tests.py

    Change-Id: Ic56b1096386548e8253e40cbd54ee5fc579cf413
    Closes-Bug: #1179009

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → 2015.1.0
Changed in swift:
assignee: nobody → jelly (coding1314)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Nikhil Manchanda (<email address hidden>) on branch: master
Review: https://review.openstack.org/157366
Reason: Looks like this change is no longer needed or has been superseded. Abandoning to clean out the review queue. Feel free to restore if this is not the case, and this is still a change that is actively being worked upon. Thanks!

Changed in swift:
importance: Undecided → Wishlist
Changed in python-ceilometerclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on swift (master)

Change abandoned by John Dickinson (<email address hidden>) on branch: master
Review: https://review.openstack.org/192960
Reason: Abanoning based on the lack of activity since the last negative review. If you want to continue working on this, please reopen this patch.

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/302070

Changed in trove:
assignee: Wu Wenxiang (wu-wenxiang) → Nikhil Manchanda (slicknik)
Amrith Kumar (amrith)
Changed in trove:
importance: Wishlist → Low
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Nikhil Manchanda (<email address hidden>) on branch: master
Review: https://review.openstack.org/302070
Reason: Abandoning for now

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.