On 2/1/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 2/1/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > > is there a > > > HOWTO somewhere on how to write a test which does the whole model, > > > database sync, etc etc cycle? > > [...] > > [...] > > Django's internal tests are in the /tests directory, and are executed > by running /tests/runtests.py. /tests/modeltests are tests that double > as documentation (they get automagically turned into the online > documentation at http://djangoproject.com/documentaion/models/); > /tests/regressiontests contains more extensive tests, and tests to > make sure that a particular bug never surfaces again. >
I've tried to implement some tests of this functionality. As I see, James Bennett and serbaut <[EMAIL PROTECTED]> (the original author of the patch) are right when they [1]say the #2210 ticket is about a different issue and that the symptoms described in this thread make ticket #2076 a better match. I may have some responsability because I was the first to suggest these two tickets were related :( So, I have attached the patch to ticket #2076 and IMHO it should to be reopened, ticket #2210 has become very confusing and some effort should be put in trying to reproduce the missbehaviour described by the original poster. The patch includes the modifications implemented by serbaut and enhanced by Michael Radziej updated to trunk as of r4455 (just line offset unfuzzyfication) and modifications to the "ordering" modeltest/example (tests/modeltets/ordering/). Some notes: * The patch allows one to use relationship_name__related_model_field_name ordering specification in the order_by() QuerySet method but not in the Meta.ordering attribute. * I have tested only ForeignKey relationships. * I have not tested if the ordering specification can be used by spanning through reverse relationships. * The patch does not seem to preserve backward compatibility with the "old" '[-]appname_tablename.fieldname' order_by specification notation suggested by the [2]Django documentation, would it be worth to note this if the patch gets applied?. HTH 1. http://groups.google.com/group/django-developers/browse_frm/thread/731f26c0184f6cde/28181488c9dea079?lnk=gst&rnum=2&hl=en#28181488c9dea079 2. http://www.djangoproject.com/documentation/db_api/#order-by-fields -- Ramiro Morales --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---