← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1366797] Re: Add UT assert to check subset of dict

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1366797

Title:
  Add UT assert to check subset of dict

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  With the VPN unit tests, there are many occasions where there is a
  desire to test if an actual dict contains keys and values specified in
  some expected dict. The actual dict would be a superset, as there may
  be keys (e.g. auth) that can be ignored.

  Rather than make the change local to VPN code, this bug is suggesting
  to add this as an assert into the base test class, so that everyone
  can use it. The test would check that the expected dict is a subset of
  the actual dict.  Signature would be:

      def assertDictSupersetOf(self, expected_subset, actual_superset):
          """Checks that actual dict contains the expected dict."""

  
  This is similar to assertDictContainsSubset(), but we are not using
  that method, because it is not available in 2.6 and has been deprecated in
  3.2 due to confusion over the API (see 3.2 release notes).

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1366797/+subscriptions


References