Hi in my system, i have a few predefined groups, and some custom permissions. the predefined groups have a strictly defined set of these permission; it's a very basic part of the specification.
so, i defined these groups and the required permissions and dumped to a fixture file. after cleaning it to remove the basic tables, i set it as the 'initial_data' fixture. it worked very well. to write tests, i use the same fixture and a few more defining test data and users. so far, no problem. the problems arose when i refactored some of the tables. now the tests fail because the test users have wrong permissions. after checking a little, i found the auth_permissions records are generated in a different order, so the number-based relationship in the initial_data fixture is all wrong. even worse, it's wrong in different ways in the 'real' database and the test database, i guess because the real database has been growing with each syncdb, while the test database is generated from scratch each time. there was some work about non-pk relationships in fixtures. i don't know if it ended up in Django 1.2; but this is to be deployed on Django 1.1 is there a better way to express permissions in fixtures? or if not, can i run some python code after fixture loading to setup the relationships? -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

