Use testtools for base test class

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

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
Angus Salkeld (asalkeld) wrote :
Changed in python-ceilometerclient:
assignee: nobody → Angus Salkeld (asalkeld)
status: New → Fix Committed
Angus Salkeld (asalkeld) wrote :
Changed in ceilometer:
assignee: nobody → Angus Salkeld (asalkeld)
status: New → Fix Committed
Changed in horizon:
milestone: havana-1 → havana-2

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) on 2013-05-29
Changed in ceilometer:
milestone: none → havana-1
status: Fix Committed → Fix Released
James E. Blair (corvus) on 2013-06-04
Changed in openstack-ci:
assignee: nobody → Monty Taylor (mordred)
importance: Undecided → Medium
milestone: none → havana
status: New → Triaged
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) on 2013-06-07
Changed in keystone:
importance: Undecided → Wishlist
status: New → Triaged
Changed in horizon:
milestone: havana-2 → havana-3
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) on 2013-08-11
no longer affects: openstack-ci
Jeremy Stanley (fungi) on 2013-08-17
Changed in git-review:
assignee: nobody → Dina Belova (dbelova)
importance: Undecided → High
status: New → Fix Committed
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

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) on 2013-09-05
Changed in keystone:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-09-05
Changed in oslo:
milestone: none → havana-3
status: Fix Committed → Fix Released

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) on 2013-10-17
Changed in oslo:
milestone: havana-3 → 2013.2
Thierry Carrez (ttx) on 2013-10-17
Changed in ceilometer:
milestone: havana-1 → 2013.2
Thierry Carrez (ttx) on 2013-10-17
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
Steve Kowalik (stevenk) wrote :

Glance uses testrepository as of commit d7f1221684ea3c958f0a382764074adb5ee6cbcf.

Changed in glance:
status: New → Fix Committed
Thierry Carrez (ttx) on 2014-04-01
Changed in glance:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in glance:
milestone: icehouse-rc1 → 2014.1
Denis M. (dmakogon) on 2014-06-03
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)
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

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
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) on 2014-07-29
Changed in sahara:
status: Fix Committed → Fix Released
Denis M. (dmakogon) on 2014-09-20
Changed in trove:
status: New → Triaged
Thierry Carrez (ttx) on 2014-10-16
Changed in sahara:
milestone: juno-2 → 2014.2
Amrith Kumar (amrith) on 2014-10-23
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

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

Changed in trove:
assignee: nobody → Wu Wenxiang (wu-wenxiang)
status: Triaged → In Progress

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) on 2015-03-19
Changed in horizon:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2015-04-30
Changed in horizon:
milestone: kilo-3 → 2015.1.0
Changed in swift:
assignee: nobody → jelly (coding1314)
status: New → In Progress

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

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

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) on 2016-04-06
Changed in trove:
importance: Wishlist → Low
milestone: none → newton-1

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  Edit
Everyone can see this information.

Other bug subscribers