BIND 10 #2937: The user manager's test_bad_data fails

BIND 10 Development do-not-reply at isc.org
Fri May 17 19:19:47 UTC 2013


#2937: The user manager's test_bad_data fails
-------------------------------------+-------------------------------------
            Reporter:  vorner        |                        Owner:
                Type:  defect        |  UnAssigned
            Priority:  high          |                       Status:
           Component:  Unclassified  |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130528
         Sub-Project:  Core          |                   Resolution:
Estimated Difficulty:  3             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 - is the `strict` parameter is always available?
 {{{#!diff
 -                reader = csv.reader(csvfile)
 +                reader = csv.reader(csvfile, strict=True)
 }}}
   I can't find it in the documentation for Python 3.2.3
   (http://docs.python.org/release/3.2.3/library/csv.html), which is
   the version I'm using locally, while it's mentioned in the doc for
   Python2 http://docs.python.org/2/library/csv.html  It didn't trigger
   an error for me, so it at least seems to be recognized.  But I
   wonder whether it might be getting deprecated.
 - I'd update the doc for run_check() on the return value
 - I'm not sure whether it makes sense to return `returncode`, as it's
   checked with `assertEqual`: if the method returns, the caller knows
   the code is the expected one; if assert fails the function doesn't
   return anyway.
 - the test didn't fail for me before so I cannot 100% sure if this
   change is correct:
 {{{#!diff
 +        self.assertTrue(stdout ==
 +                        'Using accounts file: test_users.csv\n'
 +                        'Error parsing csv file: newline inside string\n'
 or
 +                        stdout ==
 +                        'Using accounts file: test_users.csv\n'
 +                        'Error parsing csv file: unexpected end of
 data\n')
 }}}
   I trust you on this, so it's okay for now, but obviously this
   approach won't scale if we see more variations.  So I'd add some
   comments, saying like "if it turns out we have a lot more variations
   we should probably reconsider how to check it so we won't have to
   list all possibilities".

-- 
Ticket URL: <http://bind10.isc.org/ticket/2937#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list