tests/test_rowdict.py
changeset 81 f709b1c7ca0c
parent 48 b82c7c2fb5af
child 104 d8ff52a0390f
equal deleted inserted replaced
80:b830c6f7b30a 81:f709b1c7ca0c
    21 
    21 
    22     def test_rowdict_index_access(self):
    22     def test_rowdict_index_access(self):
    23         self.assertEqual(self.rowdict[0], 123)
    23         self.assertEqual(self.rowdict[0], 123)
    24 
    24 
    25     def test_rowdict_unpack(self):
    25     def test_rowdict_unpack(self):
    26         _id, name = self.rowdict
    26         _id, name = self.rowdict.values()
    27         self.assertEqual(name, 'hello')
    27         self.assertEqual(name, 'hello')
       
    28 
       
    29     def test_rowdict_repr(self):
       
    30         repr_text = "RowDict([('id', 123), ('name', 'hello')])"
       
    31         self.assertEqual(repr(self.rowdict), repr_text)
       
    32         self.assertEqual(str(self.rowdict), repr_text)
    28 
    33 
    29 
    34 
    30 if __name__ == '__main__':
    35 if __name__ == '__main__':
    31     unittest.main()
    36     unittest.main()
       
    37