Awesome, thanks! I'll get onto that asap. Everyone here and the IRC have been very helpful :)
On Thursday, January 31, 2013 10:36:32 PM UTC-8, Russell Keith-Magee wrote: > > > On Fri, Feb 1, 2013 at 10:25 AM, Steven Vargas > <[email protected]<javascript:> > > wrote: > >> Hi, I'm a student and this is my first contribution to an open source >> project so I am trying to learn along the way. >> >> Anyways, I submitted a patch for >> #18150<https://code.djangoproject.com/ticket/18150>and I was looking for >> input on where to go from here. On the IRC channel it >> was suggested that I upload tests for the patch. Do I have to build an >> django app that utilizes the methods/classes I changed? I was thinking I >> could use unit testing as it seems to make more sense but I'm not exactly >> sure how I would run the unit tests, I have some experience with unit >> testing on simple java applications but nothing like Django, I'm wondering >> where to go from here. >> > > In essence, you've got the right idea - you need to write an app that > exercises the new code that you've added. However, you've missed the fact > that Django provides a lot of the testing infrastructure for you. > > Django's has it's own test suite -- the code is contained in the top-level > "tests" directory. This test suite consists of a collection of test apps > that exercise much of the functionality of Django. > > Instructions for running Django's test suite can be found here: > > > https://docs.djangoproject.com/en/1.4/internals/contributing/writing-code/unit-tests/ > > Specifically, if you look in the tests/regressiontests/file_uploads > directory, you'll find a bunch of existing tests for file uploads. What you > need to do is add a new test -- one that fails by default, but passes when > you add your fix. Include that fix as part of your overall patch, and > you're done! > > Yours, > Russ Magee %-) > > > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
