comparison test/test_xmlrpc.py @ 5504:7f3dfdd6a620

make sure everything is sorted in the xmlrpc schema
author Christof Meerwald <cmeerw@cmeerw.org>
date Thu, 16 Aug 2018 20:34:42 +0100
parents 28613ada27db
children 58817c3bf471
comparison
equal deleted inserted replaced
5503:4f6e1ce89557 5504:7f3dfdd6a620
99 fileid = 'file' + results 99 fileid = 'file' + results
100 results = self.server.display(fileid, 'content') 100 results = self.server.display(fileid, 'content')
101 self.assertEqual(results['content'], 'hello\r\nthere') 101 self.assertEqual(results['content'], 'hello\r\nthere')
102 102
103 def testSchema(self): 103 def testSchema(self):
104 schema={'status': [('order', '<roundup.hyperdb.Number>'), 104 schema={'status': [('name', '<roundup.hyperdb.String>'),
105 ('name', '<roundup.hyperdb.String>')], 105 ('order', '<roundup.hyperdb.Number>')],
106 'keyword': [('name', '<roundup.hyperdb.String>')], 106 'keyword': [('name', '<roundup.hyperdb.String>')],
107 'priority': [('order', '<roundup.hyperdb.Number>'), 107 'priority': [('name', '<roundup.hyperdb.String>'),
108 ('name', '<roundup.hyperdb.String>')], 108 ('order', '<roundup.hyperdb.Number>')],
109 'user': [('username', '<roundup.hyperdb.String>'), 109 'user': [('address', '<roundup.hyperdb.String>'),
110 ('alternate_addresses', '<roundup.hyperdb.String>'), 110 ('alternate_addresses', '<roundup.hyperdb.String>'),
111 ('organisation', '<roundup.hyperdb.String>'),
112 ('password', '<roundup.hyperdb.Password>'),
113 ('phone', '<roundup.hyperdb.String>'),
114 ('queries', '<roundup.hyperdb.Multilink to "query">'),
111 ('realname', '<roundup.hyperdb.String>'), 115 ('realname', '<roundup.hyperdb.String>'),
112 ('roles', '<roundup.hyperdb.String>'), 116 ('roles', '<roundup.hyperdb.String>'),
113 ('organisation', '<roundup.hyperdb.String>'),
114 ('queries', '<roundup.hyperdb.Multilink to "query">'),
115 ('phone', '<roundup.hyperdb.String>'),
116 ('address', '<roundup.hyperdb.String>'),
117 ('timezone', '<roundup.hyperdb.String>'), 117 ('timezone', '<roundup.hyperdb.String>'),
118 ('password', '<roundup.hyperdb.Password>')], 118 ('username', '<roundup.hyperdb.String>')],
119 'file': [('content', '<roundup.hyperdb.String>'), 119 'file': [('content', '<roundup.hyperdb.String>'),
120 ('type', '<roundup.hyperdb.String>'), 120 ('name', '<roundup.hyperdb.String>'),
121 ('name', '<roundup.hyperdb.String>')], 121 ('type', '<roundup.hyperdb.String>')],
122 'msg': [('files', '<roundup.hyperdb.Multilink to "file">'), 122 'msg': [('author', '<roundup.hyperdb.Link to "user">'),
123 ('content', '<roundup.hyperdb.String>'),
124 ('date', '<roundup.hyperdb.Date>'),
125 ('files', '<roundup.hyperdb.Multilink to "file">'),
123 ('inreplyto', '<roundup.hyperdb.String>'), 126 ('inreplyto', '<roundup.hyperdb.String>'),
127 ('messageid', '<roundup.hyperdb.String>'),
128 ('recipients', '<roundup.hyperdb.Multilink to "user">'),
129 ('summary', '<roundup.hyperdb.String>'),
124 ('tx_Source', '<roundup.hyperdb.String>'), 130 ('tx_Source', '<roundup.hyperdb.String>'),
125 ('recipients', '<roundup.hyperdb.Multilink to "user">'),
126 ('author', '<roundup.hyperdb.Link to "user">'),
127 ('summary', '<roundup.hyperdb.String>'),
128 ('content', '<roundup.hyperdb.String>'),
129 ('messageid', '<roundup.hyperdb.String>'),
130 ('date', '<roundup.hyperdb.Date>'),
131 ('type', '<roundup.hyperdb.String>')], 131 ('type', '<roundup.hyperdb.String>')],
132 'query': [('url', '<roundup.hyperdb.String>'), 132 'query': [('klass', '<roundup.hyperdb.String>'),
133 ('name', '<roundup.hyperdb.String>'),
133 ('private_for', '<roundup.hyperdb.Link to "user">'), 134 ('private_for', '<roundup.hyperdb.Link to "user">'),
134 ('name', '<roundup.hyperdb.String>'), 135 ('url', '<roundup.hyperdb.String>')],
135 ('klass', '<roundup.hyperdb.String>')], 136 'issue': [('assignedto', '<roundup.hyperdb.Link to "user">'),
136 'issue': [('status', '<roundup.hyperdb.Link to "status">'),
137 ('files', '<roundup.hyperdb.Multilink to "file">'), 137 ('files', '<roundup.hyperdb.Multilink to "file">'),
138 ('tx_Source', '<roundup.hyperdb.String>'),
139 ('keyword', '<roundup.hyperdb.Multilink to "keyword">'), 138 ('keyword', '<roundup.hyperdb.Multilink to "keyword">'),
139 ('messages', '<roundup.hyperdb.Multilink to "msg">'),
140 ('nosy', '<roundup.hyperdb.Multilink to "user">'),
141 ('priority', '<roundup.hyperdb.Link to "priority">'),
142 ('status', '<roundup.hyperdb.Link to "status">'),
143 ('superseder', '<roundup.hyperdb.Multilink to "issue">'),
140 ('title', '<roundup.hyperdb.String>'), 144 ('title', '<roundup.hyperdb.String>'),
141 ('nosy', '<roundup.hyperdb.Multilink to "user">'), 145 ('tx_Source', '<roundup.hyperdb.String>')]}
142 ('messages', '<roundup.hyperdb.Multilink to "msg">'),
143 ('priority', '<roundup.hyperdb.Link to "priority">'),
144 ('assignedto', '<roundup.hyperdb.Link to "user">'),
145 ('superseder', '<roundup.hyperdb.Multilink to "issue">')]}
146 146
147 results = self.server.schema() 147 results = self.server.schema()
148 self.assertEqual(results, schema) 148 self.assertEqual(results, schema)
149 149
150 def testLookup(self): 150 def testLookup(self):

Roundup Issue Tracker: http://roundup-tracker.org/