Skip to content
Snippets Groups Projects
  1. Apr 04, 2013
  2. Apr 03, 2013
  3. Apr 02, 2013
  4. Mar 28, 2013
  5. Mar 27, 2013
  6. Mar 26, 2013
  7. Mar 22, 2013
    • Michele Tartara's avatar
      Fix bug in rlib2 unit tests · 61f8fda4
      Michele Tartara authored
      
      The "queryargs" parameter of the __init__ function of rlib2 classes should
      be a dictionary, as defined in the ResourceBase parent class (in
      lib/rapi/baserlib.py).
      
      In the rlib2 and baserlib unit tests, when the queryargs parameter is not
      actually needed, it is sometimes erroneously initialized with an empty list or a
      "None" value instead of an empty dictionary.
      
      This commit solves the problem and introduces an assertion to prevent it from
      happening again in the future.
      The use of the assertion is safe, because in production code the __init__
      function is only called by the RAPI server, with the queryargs parameter
      initialized by the Mapper.getController function (lib/rapi/connector.py) that
      always returns a dictionary. It can only affect test code and future code.
      
      Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      61f8fda4
    • Michele Tartara's avatar
      Remove use of deprecated function · fb409531
      Michele Tartara authored
      
      cgi.parse_qs() is deprecated in python 2.6 and substituted by
      urlparse.parse_qs().
      
      This patch modifies the code to use the new function.
      
      Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
      Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
      fb409531
Loading