Coverage for src/lib/dns/python/tests/nsec3hash_python_test : 98%
        
        
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
| 
 # Copyright (C) 2012 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM # DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL # INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
 
 '''These tests are mostly straightforward conversion of C++ tests except for python specific type checks. 
 ''' 
 "1 0 12 aabbccdd")) "1 0 12 aabbccdd " + self.nsec3_common)) # missing parameter 
 # invalid type of argument 
 # additional parameter RRClass.IN(), "1 0 12 aabbccdd"), 1) 
 # Invaid type of RDATA "192.0.2.1")) 
 Rdata(RRType.NSEC3PARAM(), RRClass.IN(), "2 0 12 aabbccdd")) Rdata(RRType.NSEC3(), RRClass.IN(), "2 0 12 aabbccdd " + self.nsec3_common)) 
 # A couple of normal cases from the RFC5155 example. hash.calculate(Name("example"))) hash.calculate(Name("a.example"))) 
 # Check case-insensitiveness hash.calculate(Name("EXAMPLE"))) 
 
 
 # Using unusually large iterations, something larger than the 8-bit #range. (expected hash value generated by BIND 9's dnssec-signzone) RRClass.IN(), "1 0 256 AABBCCDD")) self.test_hash.calculate(Name("example.org"))) 
 # Some boundary cases: 0-iteration and empty salt. Borrowed from the # .com zone data. RRClass.IN(),"1 0 0 -")) self.test_hash.calculate(Name("com"))) 
 
 # If all parameters match, it's considered to be matched. "1 0 12 aabbccdd" + postfix))) # Algorithm doesn't match "2 0 12 aabbccdd" + postfix))) # Iterations doesn't match "1 0 1 aabbccdd" + postfix))) # Salt doesn't match "1 0 12 aabbccde" + postfix))) # Salt doesn't match: the other has an empty salt "1 0 12 -" + postfix))) # Flag doesn't matter "1 1 12 aabbccdd" + postfix))) 
 " " + self.nsec3_common) " " + self.nsec3_common) 
 # bad parameter checks Rdata(RRType.NSEC3(), RRClass.IN(), "1 0 12 aabbccdd " + self.nsec3_common), 1) Rdata(RRType.A(), RRClass.IN(), "192.0.2.1")) 
  |