Use AssertIsNone

Bug #1503055 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Cedric Brandily
senlin
Fix Released
Low
lvdongbing

Bug Description

Neutron should use the specific assertion:

  self.assertIs(Not)None(observed)

instead of the generic assertion:

  self.assert(Not)Equal(None, observed)

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Hi Cedric,
I am fixing the related issue on Neutron-FWaaS extension and VPNaaS extension

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-fwaas (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/231281

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/231206
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fd7f84b20b30b15445725c39bc5f8b1218de25d4
Submitter: Jenkins
Branch: master

commit fd7f84b20b30b15445725c39bc5f8b1218de25d4
Author: Cedric Brandily <email address hidden>
Date: Mon Oct 5 23:55:52 2015 +0200

    Use assertIsNone(observed) instead of assertEqual(None, observed)

    Neutron should use the specific assertion:

      self.assertIsNone(observed)

    instead of the generic assertion:

      self.assertEqual(None, observed)

    as it raises more specific errors.

    Closes-Bug: #1503055
    Change-Id: Ib7e5875bd0a95320d89a7504f951998fb210acc1

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

It's not done for *aas, so moving back to Confirmed.

Changed in neutron:
importance: Undecided → Low
status: Fix Committed → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lbaas (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/232290

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/233144

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/231281
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=c0ae21cdf6ed572c54cc292cf6aeeb5b9e702660
Submitter: Jenkins
Branch: master

commit c0ae21cdf6ed572c54cc292cf6aeeb5b9e702660
Author: Reedip Banerjee <email address hidden>
Date: Tue Oct 6 06:44:26 2015 +0530

    use assertIs(Not)None instead of assert(Not)Equal

    Instead of using assert(Not)Equal(None, ***), developers should
    use assertIs(Not)None(***). This patch fixes the same in FWaaS.

    Change-Id: Ic668d09c49ebcd14f14664394c7187592722bf4c
    Related-Bug: #1503055

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lbaas (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/236843

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-lbaas (master)

Change abandoned by Bertrand Lallau (<email address hidden>) on branch: master
Review: https://review.openstack.org/236843

lvdongbing (dbcocle)
Changed in senlin:
assignee: nobody → lvdongbing (dbcocle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

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

Changed in senlin:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/239598
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=1dfc4076444d6e0e5c3ecf0e67a788906041adbc
Submitter: Jenkins
Branch: master

commit 1dfc4076444d6e0e5c3ecf0e67a788906041adbc
Author: lvdongbing <email address hidden>
Date: Tue Oct 27 02:15:59 2015 -0400

    Use assertIsNone(observed) instead of assertEqual(None, observed)

    we should use the specific assertion:
      self.assertIsNone(observed)
    instead of the generic assertion:
      self.assertEqual(None, observed)
    as it raises more specific errors.

    Closes-Bug: #1503055
    Change-Id: If69026cc4437e584a26bbb85d7b40dcc4df79c05

Changed in senlin:
status: In Progress → Fix Committed
no longer affects: manila
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lbaas (master)

Reviewed: https://review.openstack.org/232290
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=2a04313095b3641fd7a2f70f7a12c8964f8e327f
Submitter: Jenkins
Branch: master

commit 2a04313095b3641fd7a2f70f7a12c8964f8e327f
Author: Kenji Yasui <email address hidden>
Date: Thu Oct 8 00:25:57 2015 +0000

    use assertIs(Not)None instead of assert(Not)Equal

    Instead of using assert(Not)Equal(None, ***), developers should
    use assertIs(Not)None(***). This patch fixes the same in LBaaS.

    Change-Id: Ib29dc2c75b84977c4443b80f940331a572e5ec1d
    Related-Bug: #1503055

Revision history for this message
Cedric Brandily (cbrandily) wrote :

 https://review.openstack.org/232290 corrected neutron-fwaas and neutron-lbaas/vpnaas are not affected

Changed in neutron:
status: Confirmed → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b1

This issue was fixed in the openstack/neutron 8.0.0.0b1 development milestone.

Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/233144
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Qiming Teng (tengqim)
Changed in senlin:
status: Fix Committed → Fix Released
importance: Undecided → Low
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/senlin 1.0.0.0b2

This issue was fixed in the openstack/senlin 1.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/233144
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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.