no longer inherit list, Table inherits list
[tests.git] / qaapi / qa / Persons.py
1 import os
2 from Table import Table
3
4 class Person(dict):
5
6      fields = {
7         'plcs': ['TestPLC'],
8         'first_name': None,
9         'last_name': None,
10         'password': None,
11         'email': None,
12         }
13
14      def __init__(self, fields = {}):
15
16         dict.__init__(self, self.fields)
17         
18         self.update(fields)
19
20 class Persons(Table):
21     def __init__(self, persons):
22         personlist = [Person(person) for person in persons]
23         Table.__init__(self, personlist)