Changeset 1009

Show
Ignore:
Timestamp:
09/01/07 13:00:51 (15 months ago)
Author:
wichert
Message:

More test work

Location:
trunk
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/pyrad/dictionary.py

    r1008 r1009  
    123123         
    124124 
     125        def __len__(self): 
     126                return len(self.attributes) 
     127 
    125128        def __getitem__(self, key): 
    126129                return self.attributes[key] 
  • trunk/pyrad/tests/data/simple

    r1007 r1009  
    11# A simple dictionary 
    22 
    3 Attribute  Test-String       1       string 
    4 Attribute  Test-Octets       2       octets 
    5 Attribute  Test-Integer      3       integer 
    6 Attribute  Test-Ip-Address   4       ipaddr 
    7 Attribute  Test-Ipv6-Address 5       ipv6addr 
    8 Attribute  Test-If-Id        6       ifid 
    9 Attribute  Test-Date         7       date 
    10 Attribute  Test-Abinary      8       abinary 
     3ATTRIBUTE  Test-String       1       string 
     4ATTRIBUTE  Test-Octets       2       octets 
     5ATTRIBUTE  Test-Integer      3       integer 
     6ATTRIBUTE  Test-Ip-Address   4       ipaddr 
     7ATTRIBUTE  Test-Ipv6-Address 5       ipv6addr 
     8ATTRIBUTE  Test-If-Id        6       ifid 
     9ATTRIBUTE  Test-Date         7       date 
     10ATTRIBUTE  Test-Abinary      8       abinary 
    1111 
  • trunk/pyrad/tests/testDictionary.py

    r1007 r1009  
    2121    def testParseSimpleDictionary(self): 
    2222        dict=Dictionary(os.path.join(self.path, "simple")) 
    23         self.assertEqual(len(dict), 5) 
     23        self.assertEqual(len(dict), 8) 
    2424        values = [ 
    2525                ( "Test-String", 1, "string" ), 
     
    3636            attr=dict[attr] 
    3737            self.assertEqual(attr.code, code) 
    38             self.assertEqual(attr.datatype, type) 
     38            self.assertEqual(attr.type, type) 
    3939