On Fri, Jul 18, 2008 at 8:47 PM, Rozza <[EMAIL PROTECTED]> wrote: > > Ah no problems! > > As there aren't any tests for the staff_member_required or even > request.get_full_path() I wasn't 100% sure what the procedure would be > as these are used through out Django. > > As it's such a minor change does it warrant the bureaucracy of > requiring tests to have it implemented?
Yes. Next question? :-) There are some parts of Django that either do not have tests. These usually correspond to the oldest parts of the framework, which existed before Django had a full testing framework. Tha'ts not an excuse to avoid writing tests - it just means that your tests will be the first tests in that area. The tests serve multiple purposes: - they demonstrate the existence of a problem, which makes the triage process easier - they demonstrate that your patch fixes the problem - they prevent the problem from happening again in the future. With very few exceptions, nothing gets committed to the code base unless it has tests. > I think definitely there should be a ticket opened to ensure that > tests are written to test the logic staff_member_required and > request.get_full_path(). At the moment I'm not sure where they would > fit. The hard part is writing the tests, not deciding where to put them. Worst case, the core developer that commits your patch will put the tests into a different location. However, that said, the decision on where to put a test goes something like this: * Is it a specific test of a contrib app? If yes, put it in the tests module for that app * Could the test serve as a form of documentation for a feature? If yes, put it in modeltests. * Otherwise, put it in regressiontests. Beyond that, try to add the tests to an existing test module within modeltests/regressiontests; however, if you can't find anything appropriate, feel free to suggest a new test module. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---