server/test/unittest_msplanner.py
changeset 2608 21856eda34f6
parent 2180 bf2e81fb52be
child 2715 acdaf780d4a6
equal deleted inserted replaced
2607:5d889b4928bb 2608:21856eda34f6
    48                      {'X': 'CWCache'}, {'X': 'CWConstraint'}, {'X': 'CWConstraintType'},
    48                      {'X': 'CWCache'}, {'X': 'CWConstraint'}, {'X': 'CWConstraintType'},
    49                      {'X': 'CWEType'}, {'X': 'CWAttribute'}, {'X': 'CWGroup'},
    49                      {'X': 'CWEType'}, {'X': 'CWAttribute'}, {'X': 'CWGroup'},
    50                      {'X': 'CWRelation'}, {'X': 'CWPermission'}, {'X': 'CWProperty'},
    50                      {'X': 'CWRelation'}, {'X': 'CWPermission'}, {'X': 'CWProperty'},
    51                      {'X': 'CWRType'}, {'X': 'CWUser'}, {'X': 'Email'},
    51                      {'X': 'CWRType'}, {'X': 'CWUser'}, {'X': 'Email'},
    52                      {'X': 'EmailAddress'}, {'X': 'EmailPart'}, {'X': 'EmailThread'},
    52                      {'X': 'EmailAddress'}, {'X': 'EmailPart'}, {'X': 'EmailThread'},
       
    53                      {'X': 'ExternalUri'},
    53                      {'X': 'File'}, {'X': 'Folder'}, {'X': 'Image'},
    54                      {'X': 'File'}, {'X': 'Folder'}, {'X': 'Image'},
    54                      {'X': 'Note'}, {'X': 'Personne'}, {'X': 'RQLExpression'},
    55                      {'X': 'Note'}, {'X': 'Personne'}, {'X': 'RQLExpression'},
    55                      {'X': 'Societe'}, {'X': 'State'}, {'X': 'SubDivision'},
    56                      {'X': 'Societe'}, {'X': 'State'}, {'X': 'SubDivision'},
    56                      {'X': 'Tag'}, {'X': 'TrInfo'}, {'X': 'Transition'}])
    57                      {'X': 'Tag'}, {'X': 'TrInfo'}, {'X': 'Transition'}])
    57 
    58 
   871                         ('UnionFetchStep',
   872                         ('UnionFetchStep',
   872                          [('FetchStep', [('Any X WHERE X is IN(Card, Note, State)',
   873                          [('FetchStep', [('Any X WHERE X is IN(Card, Note, State)',
   873                                           [{'X': 'Card'}, {'X': 'Note'}, {'X': 'State'}])],
   874                                           [{'X': 'Card'}, {'X': 'Note'}, {'X': 'State'}])],
   874                            [self.cards, self.system], {}, {'X': 'table0.C0'}, []),
   875                            [self.cards, self.system], {}, {'X': 'table0.C0'}, []),
   875                           ('FetchStep',
   876                           ('FetchStep',
   876                            [('Any X WHERE X is IN(Bookmark, CWAttribute, CWCache, CWConstraint, CWConstraintType, CWEType, CWGroup, CWPermission, CWProperty, CWRType, CWRelation, Comment, Division, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
   877                            [('Any X WHERE X is IN(Bookmark, CWAttribute, CWCache, CWConstraint, CWConstraintType, CWEType, CWGroup, CWPermission, CWProperty, CWRType, CWRelation, Comment, Division, Email, EmailAddress, EmailPart, EmailThread, ExternalUri, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
   877                              sorted([{'X': 'Bookmark'}, {'X': 'Comment'}, {'X': 'Division'},
   878                              sorted([{'X': 'Bookmark'}, {'X': 'Comment'}, {'X': 'Division'},
   878                                       {'X': 'CWCache'}, {'X': 'CWConstraint'}, {'X': 'CWConstraintType'},
   879                                       {'X': 'CWCache'}, {'X': 'CWConstraint'}, {'X': 'CWConstraintType'},
   879                                       {'X': 'CWEType'}, {'X': 'CWAttribute'}, {'X': 'CWGroup'},
   880                                       {'X': 'CWEType'}, {'X': 'CWAttribute'}, {'X': 'CWGroup'},
   880                                       {'X': 'CWRelation'}, {'X': 'CWPermission'}, {'X': 'CWProperty'},
   881                                       {'X': 'CWRelation'}, {'X': 'CWPermission'}, {'X': 'CWProperty'},
   881                                       {'X': 'CWRType'}, {'X': 'Email'}, {'X': 'EmailAddress'},
   882                                       {'X': 'CWRType'}, {'X': 'Email'}, {'X': 'EmailAddress'},
   882                                       {'X': 'EmailPart'}, {'X': 'EmailThread'}, {'X': 'File'},
   883                                       {'X': 'EmailPart'}, {'X': 'EmailThread'}, {'X': 'ExternalUri'}, {'X': 'File'},
   883                                       {'X': 'Folder'}, {'X': 'Image'}, {'X': 'Personne'},
   884                                       {'X': 'Folder'}, {'X': 'Image'}, {'X': 'Personne'},
   884                                       {'X': 'RQLExpression'}, {'X': 'Societe'}, {'X': 'SubDivision'},
   885                                       {'X': 'RQLExpression'}, {'X': 'Societe'}, {'X': 'SubDivision'},
   885                                       {'X': 'Tag'}, {'X': 'TrInfo'}, {'X': 'Transition'}]))],
   886                                       {'X': 'Tag'}, {'X': 'TrInfo'}, {'X': 'Transition'}]))],
   886                            [self.system], {}, {'X': 'table0.C0'}, []),
   887                            [self.system], {}, {'X': 'table0.C0'}, []),
   887                           ]),
   888                           ]),
   920                       ('FetchStep', [('Any ET,X WHERE X is ET, EXISTS(X owned_by 5), ET is CWEType, X is CWUser',
   921                       ('FetchStep', [('Any ET,X WHERE X is ET, EXISTS(X owned_by 5), ET is CWEType, X is CWUser',
   921                                       [{'ET': 'CWEType', 'X': 'CWUser'}])],
   922                                       [{'ET': 'CWEType', 'X': 'CWUser'}])],
   922                        [self.system], {'X': 'table3.C0'}, {'ET': 'table0.C0', 'X': 'table0.C1'}, []),
   923                        [self.system], {'X': 'table3.C0'}, {'ET': 'table0.C0', 'X': 'table0.C1'}, []),
   923                       # extra UnionFetchStep could be avoided but has no cost, so don't care
   924                       # extra UnionFetchStep could be avoided but has no cost, so don't care
   924                       ('UnionFetchStep',
   925                       ('UnionFetchStep',
   925                        [('FetchStep', [('Any ET,X WHERE X is ET, ET is CWEType, X is IN(Bookmark, CWAttribute, CWCache, CWConstraint, CWConstraintType, CWEType, CWGroup, CWPermission, CWProperty, CWRType, CWRelation, Comment, Division, Email, EmailAddress, EmailPart, EmailThread, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
   926                        [('FetchStep', [('Any ET,X WHERE X is ET, ET is CWEType, X is IN(Bookmark, CWAttribute, CWCache, CWConstraint, CWConstraintType, CWEType, CWGroup, CWPermission, CWProperty, CWRType, CWRelation, Comment, Division, Email, EmailAddress, EmailPart, EmailThread, ExternalUri, File, Folder, Image, Personne, RQLExpression, Societe, SubDivision, Tag, TrInfo, Transition)',
   926                                         [{'X': 'Bookmark', 'ET': 'CWEType'}, {'X': 'Comment', 'ET': 'CWEType'},
   927                                         [{'X': 'Bookmark', 'ET': 'CWEType'}, {'X': 'Comment', 'ET': 'CWEType'},
   927                                          {'X': 'Division', 'ET': 'CWEType'}, {'X': 'CWCache', 'ET': 'CWEType'},
   928                                          {'X': 'Division', 'ET': 'CWEType'}, {'X': 'CWCache', 'ET': 'CWEType'},
   928                                          {'X': 'CWConstraint', 'ET': 'CWEType'}, {'X': 'CWConstraintType', 'ET': 'CWEType'},
   929                                          {'X': 'CWConstraint', 'ET': 'CWEType'}, {'X': 'CWConstraintType', 'ET': 'CWEType'},
   929                                          {'X': 'CWEType', 'ET': 'CWEType'}, {'X': 'CWAttribute', 'ET': 'CWEType'},
   930                                          {'X': 'CWEType', 'ET': 'CWEType'}, {'X': 'CWAttribute', 'ET': 'CWEType'},
   930                                          {'X': 'CWGroup', 'ET': 'CWEType'}, {'X': 'CWRelation', 'ET': 'CWEType'},
   931                                          {'X': 'CWGroup', 'ET': 'CWEType'}, {'X': 'CWRelation', 'ET': 'CWEType'},
   931                                          {'X': 'CWPermission', 'ET': 'CWEType'}, {'X': 'CWProperty', 'ET': 'CWEType'},
   932                                          {'X': 'CWPermission', 'ET': 'CWEType'}, {'X': 'CWProperty', 'ET': 'CWEType'},
   932                                          {'X': 'CWRType', 'ET': 'CWEType'}, {'X': 'Email', 'ET': 'CWEType'},
   933                                          {'X': 'CWRType', 'ET': 'CWEType'}, {'X': 'Email', 'ET': 'CWEType'},
   933                                          {'X': 'EmailAddress', 'ET': 'CWEType'}, {'X': 'EmailPart', 'ET': 'CWEType'},
   934                                          {'X': 'EmailAddress', 'ET': 'CWEType'}, {'X': 'EmailPart', 'ET': 'CWEType'},
   934                                          {'X': 'EmailThread', 'ET': 'CWEType'}, {'X': 'File', 'ET': 'CWEType'},
   935                                          {'X': 'EmailThread', 'ET': 'CWEType'},
       
   936                                          {'ET': 'CWEType', 'X': 'ExternalUri'},
       
   937                                          {'X': 'File', 'ET': 'CWEType'},
   935                                          {'X': 'Folder', 'ET': 'CWEType'}, {'X': 'Image', 'ET': 'CWEType'},
   938                                          {'X': 'Folder', 'ET': 'CWEType'}, {'X': 'Image', 'ET': 'CWEType'},
   936                                          {'X': 'Personne', 'ET': 'CWEType'}, {'X': 'RQLExpression', 'ET': 'CWEType'},
   939                                          {'X': 'Personne', 'ET': 'CWEType'}, {'X': 'RQLExpression', 'ET': 'CWEType'},
   937                                          {'X': 'Societe', 'ET': 'CWEType'}, {'X': 'SubDivision', 'ET': 'CWEType'},
   940                                          {'X': 'Societe', 'ET': 'CWEType'}, {'X': 'SubDivision', 'ET': 'CWEType'},
   938                                          {'X': 'Tag', 'ET': 'CWEType'}, {'X': 'TrInfo', 'ET': 'CWEType'},
   941                                          {'X': 'Tag', 'ET': 'CWEType'}, {'X': 'TrInfo', 'ET': 'CWEType'},
   939                                          {'X': 'Transition', 'ET': 'CWEType'}])],
   942                                          {'X': 'Transition', 'ET': 'CWEType'}])],
   956                                {'ET': 'CWEType', 'X': 'CWAttribute'}, {'ET': 'CWEType', 'X': 'CWGroup'},
   959                                {'ET': 'CWEType', 'X': 'CWAttribute'}, {'ET': 'CWEType', 'X': 'CWGroup'},
   957                                {'ET': 'CWEType', 'X': 'CWRelation'}, {'ET': 'CWEType', 'X': 'CWPermission'},
   960                                {'ET': 'CWEType', 'X': 'CWRelation'}, {'ET': 'CWEType', 'X': 'CWPermission'},
   958                                {'ET': 'CWEType', 'X': 'CWProperty'}, {'ET': 'CWEType', 'X': 'CWRType'},
   961                                {'ET': 'CWEType', 'X': 'CWProperty'}, {'ET': 'CWEType', 'X': 'CWRType'},
   959                                {'ET': 'CWEType', 'X': 'CWUser'}, {'ET': 'CWEType', 'X': 'Email'},
   962                                {'ET': 'CWEType', 'X': 'CWUser'}, {'ET': 'CWEType', 'X': 'Email'},
   960                                {'ET': 'CWEType', 'X': 'EmailAddress'}, {'ET': 'CWEType', 'X': 'EmailPart'},
   963                                {'ET': 'CWEType', 'X': 'EmailAddress'}, {'ET': 'CWEType', 'X': 'EmailPart'},
   961                                {'ET': 'CWEType', 'X': 'EmailThread'}, {'ET': 'CWEType', 'X': 'File'},
   964                                {'ET': 'CWEType', 'X': 'EmailThread'},
       
   965                                {'ET': 'CWEType', 'X': 'ExternalUri'},
       
   966                                {'ET': 'CWEType', 'X': 'File'},
   962                                {'ET': 'CWEType', 'X': 'Folder'}, {'ET': 'CWEType', 'X': 'Image'},
   967                                {'ET': 'CWEType', 'X': 'Folder'}, {'ET': 'CWEType', 'X': 'Image'},
   963                                {'ET': 'CWEType', 'X': 'Note'}, {'ET': 'CWEType', 'X': 'Personne'},
   968                                {'ET': 'CWEType', 'X': 'Note'}, {'ET': 'CWEType', 'X': 'Personne'},
   964                                {'ET': 'CWEType', 'X': 'RQLExpression'}, {'ET': 'CWEType', 'X': 'Societe'},
   969                                {'ET': 'CWEType', 'X': 'RQLExpression'}, {'ET': 'CWEType', 'X': 'Societe'},
   965                                {'ET': 'CWEType', 'X': 'State'}, {'ET': 'CWEType', 'X': 'SubDivision'},
   970                                {'ET': 'CWEType', 'X': 'State'}, {'ET': 'CWEType', 'X': 'SubDivision'},
   966                                {'ET': 'CWEType', 'X': 'Tag'}, {'ET': 'CWEType', 'X': 'TrInfo'},
   971                                {'ET': 'CWEType', 'X': 'Tag'}, {'ET': 'CWEType', 'X': 'TrInfo'},