Django testing applications: using fixtures

2009-09-06 Thread Oleg Oltar
Django testing application: using fixtures Hi ! I came across strange problem while trying to use mixtures in my unittests For example, I created a fixture from the database: silver:jin oleg$ python manage.py dumpdata > datastored.json Strange, but when the fixture is loaded while the t

Re: Django Testing

2009-08-20 Thread Gerard
If you got the tests in your project in a .../tests dir then add a testhelper.py with functions like this: def get_customer_data(self): customer_data = { 'company_name': 'TEST Company', 'company_zipcode': ' XX', 'company_address': 'Test Street 99',

Django Testing

2009-08-20 Thread Vitaly Babiy
I been working on a django project for some time and I keep running in to the problem that fixtures are just to fragile, I was wondering if anyone had a suggestion on how they work around this. Does anyone know of a factory framework for django that I could define a collection of models and have

Testing code that uses geopy

2009-08-10 Thread Sean Brant
I have written some unit tests that test various parts of code that utilize geopy for determining geo locations. Should I be running my tests using the geocoder class, or should I create a mock class that does not actually ping any services? If creating a mock class is recommended should I

Re: Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread ristretto.rb
> identical Dictionaries. > > The doc for this test response > attribute:http://docs.djangoproject.com/en/dev/topics/testing/#django.test.clie... > > notes that "If the rendered page used multiple templates, then context will > be a list of Context objects

Re: Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread Karen Tracey
quot;/project/usecase") > > The object response.context is a list type object containing two > identical Dictionaries. The doc for this test response attribute: http://docs.djangoproject.com/en/dev/topics/testing/#django.test.client.Response.context notes that "If the rendered page used m

Why two identical entries in django.test.utils.ContextList while testing?

2009-08-06 Thread ristretto.rb
Hello, I'm working on some unit tests using the Client that comes with subclassing django.test.TestCase. When run code like this response = self.client.get("/project/usecase") The object response.context is a list type object containing two identical Dictionaries. So, this errors ...

Problem with Client()'s cookies in testing framework.

2009-07-20 Thread John Bean
I'm having a problem with the cookies from a Client() disappearing. Here is the example I'm working with (also on dpaste: http://dpaste.com/hold/69285/) # This method works as expected. It does not lose any # cookie information. def followRedirect_working(response, expected_url): """

Re: Flushing the cache during testing

2009-07-17 Thread Russell Keith-Magee
On Sat, Jul 18, 2009 at 6:21 AM, Andrew Fong<fongand...@gmail.com> wrote: > > I'm playing around with some low-level caching of model instances. > During testing, it's necessary for me to flush out the cache so cached > whatnot from one test doesn't pollute another. > > T

Flushing the cache during testing

2009-07-17 Thread Andrew Fong
I'm playing around with some low-level caching of model instances. During testing, it's necessary for me to flush out the cache so cached whatnot from one test doesn't pollute another. To my knowledge, Django's currently doesn't offer support for resetting the cache after each testcase

Re: New to unit testing, need advice

2009-07-16 Thread Joshua Russo
Great ideas! I've started moving some of my logic that I had in admin.py and views.py into model.py and things are already starting to look easier in terms of testing. My only real hurdle now is testing validation logic on the admin pages and the form creation logic that is the main page

Re: New to unit testing, need advice

2009-07-16 Thread Javier Guerra
On Thu, Jul 16, 2009 at 3:16 PM, Jumpfroggy wrote: > You could put all these functions into the > models.py file if you wanted, you'd just end up with huge models.py > objects, and you might also run into cases where there is not an > obvious place to put a bit of

Re: New to unit testing, need advice

2009-07-16 Thread Jumpfroggy
> besides the testing issues (which are certainly a heated debate!), i have to > say that my Django projects became far better organized and a lot more > flexible when i learned to put most of the code on the models, and not on the > views. This is a pretty interesting topic.

Re: New to unit testing, need advice

2009-07-16 Thread Joshua Russo
On Jul 16, 1:35 pm, Javier Guerra wrote: > On Thu, Jul 16, 2009 at 9:27 AM, Joshua Russo wrote: > > What are some examples of mutating operations (and other operations > > for that matter) that you use in your models? > > the most obvious are: > > -

Re: New to unit testing, need advice

2009-07-16 Thread Javier Guerra
On Thu, Jul 16, 2009 at 9:27 AM, Joshua Russo wrote: > What are some examples of mutating operations (and other operations > for that matter) that you use in your models? the most obvious are: - 'calculated' fields. the first example is the __unicode__() method, but

Re: New to unit testing, need advice

2009-07-16 Thread Alex Robbins
> besides the testing issues (which are certainly a heated debate!), i have > > to say that my Django projects became far better organized and a lot more > > flexible when i learned to put most of the code on the models, and not on > > the views. > > I find this really inte

Re: New to unit testing, need advice

2009-07-16 Thread Joshua Russo
> besides the testing issues (which are certainly a heated debate!), i have to > say that my Django projects became far better organized and a lot more > flexible when i learned to put most of the code on the models, and not on the > views. I find this really interesting beca

Re: New to unit testing, need advice

2009-07-16 Thread Daniel Roseman
On Jul 16, 1:20 am, Joshua Russo <josh.r.ru...@gmail.com> wrote: > I'm in the process of implementing testing (both doc tests and unit > tests) though I'm having some conceptual difficulty. I'm not sure how > far to take the testing. I'm curious what people concider an >

Re: New to unit testing, need advice

2009-07-15 Thread Javier Guerra
Joshua Russo wrote: > This thought struck me most when I was going through the testing > documentation, in the section regarding the testing of models. It > seems to me that very little logic generally goes into the model > classes. At least for me, I have far more logic

Re: New to unit testing, need advice

2009-07-15 Thread Shawn Milochik
Basically, you want to test anything that might break if another part of the code is changed that interacts with it, might break if the application takes an alternative flow (maybe finally hits the 'else' of that if/else statement), or could possibly receive invalid input. Unfortunately,

Re: New to unit testing, need advice

2009-07-15 Thread Wayne Koorts
> I'm in the process of implementing testing (both doc tests and unit > tests) though I'm having some conceptual difficulty. I'm not sure how > far to take the testing. I'm curious what people concider an > appropriate level of testing. Uh oh, be ready for a huge thread. This is

New to unit testing, need advice

2009-07-15 Thread Joshua Russo
I'm in the process of implementing testing (both doc tests and unit tests) though I'm having some conceptual difficulty. I'm not sure how far to take the testing. I'm curious what people concider an appropriate level of testing. This thought struck me most when I was going through the testing

Re: Unit testing views.

2009-07-11 Thread J. Clifford Dyer
Woot! Thank you. I'll be pestering my sysadmins about that starting with our Tuesday meeting this week. :) Cheers, Cliff On Sat, 2009-07-11 at 22:32 +0800, Russell Keith-Magee wrote: > On Fri, Jul 10, 2009 at 1:02 PM, J. Clifford Dyer > wrote: > > > > On Fri,

Re: Unit testing views.

2009-07-11 Thread Russell Keith-Magee
On Fri, Jul 10, 2009 at 1:02 PM, J. Clifford Dyer wrote: > > On Fri, 2009-07-10 at 07:58 +0800, Russell Keith-Magee wrote: >> On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote: >> > > I am using the django testcase, but without fixtures, because loading >

Re: Automated Functional Testing

2009-07-10 Thread Kevin Teague
your tests in Python, then zope.testbrowser behaves more-or-less the same as Canoo (automated functional black-box browser testing) except you can write your tests in Python. Although it's Python only, I haven't seen anyone develop a Firefox recorder plug-in which would generate zope.testbrowser t

Re: Unit testing views.

2009-07-09 Thread J. Clifford Dyer
On Fri, 2009-07-10 at 07:58 +0800, Russell Keith-Magee wrote: > On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer<j...@unc.edu> wrote: > > > > I'm trying to get my django site under tests. I've started testing my > > pages using Client('url/to/my/page'), but I noticed tha

Re: Unit testing views.

2009-07-09 Thread Russell Keith-Magee
On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer<j...@unc.edu> wrote: > > I'm trying to get my django site under tests.  I've started testing my > pages using Client('url/to/my/page'), but I noticed that each test takes > about a second to run (just to get a response code for the

Unit testing views.

2009-07-09 Thread J. Cliff Dyer
I'm trying to get my django site under tests. I've started testing my pages using Client('url/to/my/page'), but I noticed that each test takes about a second to run (just to get a response code for the page--very basic tests). First of all, it seems like the client go through all the usual

Automated Functional Testing

2009-07-09 Thread Software Testing Training
Automated Functional Testing By Bhrigu Malhotra ( http://www.qacampus.com ) First of all let me make you all aware that I’m a developer and what you are going to read further is a developer’s account, so it may sound to you like a layman tester. But what I’m going to share is something which

Re: any ideas about "load testing" django apps?

2009-07-08 Thread Alex Gaynor
On Wed, Jul 8, 2009 at 3:52 PM, happyb787 <dcmille...@gmail.com> wrote: > > Any ideas about load testing django apps? JMeter? Ab? > > Please advise. thanks! > > > > You'd use the same tools you use for any other HTTP application, I've heard good things abo

any ideas about "load testing" django apps?

2009-07-08 Thread happyb787
Any ideas about load testing django apps? JMeter? Ab? Please advise. thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Template tag testing

2009-06-23 Thread brianmac44
; > http://bitbucket.org/newmaniese/newmanutils/src/tip/newmanutils/tests.py Thanks Michael. That was a good start for me. My tag needed some context from the testing client. http://dpaste.com/58833/ -Brian --~--~-~--~~~---~--~~ You received this message because you a

Re: Template tag testing

2009-06-23 Thread Michael
On Tue, Jun 23, 2009 at 11:53 AM, brianmac44 <brian@gmail.com> wrote: > > I tried to test template tags with doctests and unittests but I'm not > sure what token and/or context to use. What's the best practice for > testing template tags? > I don't know if this is be

Template tag testing

2009-06-23 Thread brianmac44
I tried to test template tags with doctests and unittests but I'm not sure what token and/or context to use. What's the best practice for testing template tags? Thanks, Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed

App-centric development and testing

2009-06-14 Thread Masklinn
I'm finally getting into actually testing my apps, but since Django's test system requires a settings file, I was wondering how it was usually handled: per-app settings file (versioned with the app?)? Global settings file with all the apps of the system enabled? Each app requires some

Testing Django Templates

2009-06-08 Thread Andrew Fong
I'm trying to get into a better testing flow with Django. One of things I'm trying to figure out how to test are templates. Using the Django Test Client works fine, for instance, in detecting whether I have a missing template tag (because it'll explode) or if I don't pass a particular variable

Re: Implementing A/B Testing in Django

2009-05-18 Thread John Boxall
Using template_loader idea I've developed a little pluggable app for conducting basic A/B tests. You can grab it here: http://github.com/johnboxall/django-ab/tree/master John On May 16, 9:04 pm, John Boxall wrote: > I've got a new home page and I'd like to test it's

Re: Implementing A/B Testing in Django

2009-05-18 Thread John Boxall
Thanks Tino, I am aware of GWO - just thought it would be a cool project to try! It looks like the local threads / request object available in the template loader trick is going to work - just gotta clear up some possible caching issues then it'll be ready for release. Cheers, John On May

Re: Implementing A/B Testing in Django

2009-05-17 Thread TiNo
> > Does anyone have any other ideas or suggestions about how to > dynamically show templates to users in a pluggable way while at the > same time measuring what template the user sees? > It's not about doing it in Django, but you know that Google Website Optimizer does this, and provides you out

Implementing A/B Testing in Django

2009-05-16 Thread John Boxall
I've got a new home page and I'd like to test it's performance in getting users to sign up compared to my existing home page. In Django terms I have two templates that I would like my existing view to alternate between - I want to make whatever template the viewer sees "sticky" - they see the

Re: Google website optimizer--A/B testing

2009-05-12 Thread Baxter
On May 12, 9:02 am, "bax...@gretschpages.com" <mail.bax...@gmail.com> wrote: > Does anyone know how one would do A/B testing a la Google Website > Optimizer with Django? Some sort of middleware, maybe? Disregard. After reading Google's docs a bit, all you have to do is c

Google website optimizer--A/B testing

2009-05-12 Thread bax...@gretschpages.com
Does anyone know how one would do A/B testing a la Google Website Optimizer with Django? Some sort of middleware, maybe? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Testing and 'module' object has no attribute 'handler500'

2009-05-06 Thread rvdrijst
I had the same problem but it turned out to be me, not django. See http://code.djangoproject.com/ticket/11013#comment:1 (your ticket I believe). Regards, -Robin On Apr 28, 1:02 pm, Filip Gruszczyński wrote: > I am trying to write a tests and want to try out calling some

Re: testing suite fails on auth

2009-05-05 Thread DZPM
Happened something similar to me, with test_no_remote_user and test_unknown_user. It's been fixed in trunk: http://code.djangoproject.com/changeset/10674 The ticket was: http://code.djangoproject.com/ticket/10521 -- David Arcos Sebastián On Mar 31, 4:35 pm, Filip Gruszczyński

Re: doctest testing with templatefilters

2009-04-23 Thread Jari Pennanen
gt; On Apr 12, 7:51 pm, Julian <maili...@julianmoritz.de> wrote: > > > hello, > > > I am testing some of my filters with doctests. it's very easy, but I > > have to call the module with the filters manually: > > > python /foo/bar/templatetags/eggs_extr

Re: doctest testing with templatefilters

2009-04-23 Thread Jari Pennanen
gt; hello, > > I am testing some of my filters with doctests. it's very easy, but I > have to call the module with the filters manually: > > python /foo/bar/templatetags/eggs_extra.py -v > > to let the doctest run. > > Now I've added at the end of the egg.py the following cod

Re: dynamically testing for response.context or response.context[0]

2009-04-22 Thread Russell Keith-Magee
On Thu, Apr 23, 2009 at 5:06 AM, meppum wrote: > > sorry to bring this up again in a different thread, but the old thread > was locked: >

doctest testing with templatefilters

2009-04-12 Thread Julian
hello, I am testing some of my filters with doctests. it's very easy, but I have to call the module with the filters manually: python /foo/bar/templatetags/eggs_extra.py -v to let the doctest run. Now I've added at the end of the egg.py the following code: def run_doctest(): import

Re: testing with a mock object

2009-03-31 Thread Daniel Roseman
On Mar 31, 7:39 pm, belred wrote: > i have a questions about mock objects.  i currently have a django view > function that calls a 2nd function.  this second function calls > urllib2.urlopen.   i was thinking about adding in a mock object so i > can get some better code

testing with a mock object

2009-03-31 Thread belred
i have a questions about mock objects. i currently have a django view function that calls a 2nd function. this second function calls urllib2.urlopen. i was thinking about adding in a mock object so i can get some better code coverage in the 2nd function when calling manage.py test. my first

testing suite fails on auth

2009-03-31 Thread Filip Gruszczyński
I haven't yet created any my own tests and just run ./manage.py test. This is what I got: ...FFF.. == ERROR: test_known_user (django.contrib.auth.tests.remote_user.RemoteUserCustomTest)

Re: Testing form posting

2009-03-29 Thread Martin Ostrovsky
You're POSTing the form instance, rather than the postedData. So: response = self.client.post('/myApp/post', form) should be: response = self.client.post('/myApp/post/', postedData) More info here: http://docs.djangoproject.com/en/dev/topics/testing/#making-requests On Mar 28, 9:14 pm

Testing form posting

2009-03-28 Thread tsmets
I was wondering how I could test / unittest form posting ? class TestSomeRequest(TestCase): def testCallDefaultDpasteURL(self): response = self.client.get('/my_app/') self.failUnlessEqual(response.status_code, 200) def testCallDpasteAboutURL(self): postedData = {

Re: Testing

2009-03-19 Thread Filip Gruszczyński
our tests into a file > called tests.py in your application. > > An example of testing a view with doctests can be found here: > http://docs.djangoproject.com/en/dev/topics/testing/#overview-and-a-quick-example > > Preston > > > > On Mar 18, 6:34 pm, Filip Gruszczyński &l

Re: Testing

2009-03-18 Thread Preston Timmons
Hi Filip, The Django test runner looks for tests in two places in an application--the models.py file and an optional tests.py file. If you want to run tests for your views you can move your tests into a file called tests.py in your application. An example of testing a view with doctests can

Testing

2009-03-18 Thread Filip Gruszczyński
I am trying to have my function tested using docstring with examples. When I put it into models.py of an app, it gets tested. If I put it into views.py, it is not tested; this happens also, if I add another module (which I import). How can make testing framework test those? -- Filip

Re: Browser Testing - Selenium or Windmill

2009-02-28 Thread Ryan Kelly
> What's the best tool for doing automated browser testing with Django > apps? I have some personal experience with Selenium (although not when > testing Django), which seems fairly mature, and has a great Firefox > extension, but has some serious problems dealing with frames and

Browser Testing - Selenium or Windmill

2009-02-28 Thread Chris
What's the best tool for doing automated browser testing with Django apps? I have some personal experience with Selenium (although not when testing Django), which seems fairly mature, and has a great Firefox extension, but has some serious problems dealing with frames and popups. I recently

django.test HTTP/XMLRPC Testing with use of settings.TEST_DATABASE_NAME

2009-02-26 Thread x_O
Hi Recently I'm trying to write tests for almost every thing in my code. Including HTTP and XMLRPC requests. from django.test import TestCase class XmlRpcCase(TestCase): def setUp(self): self.xmlrpc = xmlrpclib.ServerProxy("http://127.0.0.1:8000/ store/xmlrpc") def

Re: testing validation of form in unit testing

2009-02-20 Thread Vitaly
Here's the code that process all steps in unittest with checking validation form: http://dpaste.com/123059/ What I have tryed is to collect data myself as fixture to test the form validation. Thanks On Feb 20, 7:00 pm, Briel wrote: > You don't give a lot information about

Re: testing validation of form in unit testing

2009-02-20 Thread Briel
You don't give a lot information about what is happening, so I'm stabbing a bit in the dark here... I would guess your problem is that you have created a form which has a filefield that is required. Even though you probably upload a file and maybe even pass it to the form, you are not doing it

testing validation of form in unit testing

2009-02-20 Thread Vitaly
Hi all I have a test that validate processed data to form with FileField. My steps in it direct me right to one problem. here is it. 'file' is 'Required field' What I do is process simple data right to form, not request.POST and request.FILES. I have tried process in data SimpleUploadedFile

Re: Testing Django and HTTP Request

2009-02-09 Thread Vitaly Babiy
gt;>>>>>> of the test and keep it around till all test are done. And have a way to >>>>>>> tell the server what to return on the request. >>>>>>> >>>>>>> Vitaly Babiy >>>>>>> >>>>>>&g

Re: Testing Django and HTTP Request

2009-02-09 Thread Vitaly Babiy
omes >>>>>> around the port is still in use. >>>>>> I think I need to find a way to start a HTTP server at the beginning >>>>>> of the test and keep it around till all test are done. And have a way to >>>>>> tell the ser

Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
o return on the request. >>>>> >>>>> Vitaly Babiy >>>>> >>>>> >>>>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor <alex.gay...@gmail.com>wrote: >>>>> >>>>>> >>>>>

Re: Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
l test are done. And have a way to tell >>>> the server what to return on the request. >>>> >>>> Vitaly Babiy >>>> >>>> >>>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor <alex.gay...@gmail.com>wrote: >>>

Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
ell >>> the server what to return on the request. >>> >>> Vitaly Babiy >>> >>> >>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor <alex.gay...@gmail.com>wrote: >>> >>>> >>>> >>>> On Mon, Feb 9

Re: Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
x.gay...@gmail.com>wrote: >> >>> >>> >>> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy <vbabi...@gmail.com>wrote: >>> >>>> Hello everyone, >>>> >>>> I am working on a project that will need to make a request out

Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
e: > >> >> >> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy <vbabi...@gmail.com> wrote: >> >>> Hello everyone, >>> >>> I am working on a project that will need to make a request out to the web >>> and pull down some data, For testin

Re: Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
gt;> >> I am working on a project that will need to make a request out to the web >> and pull down some data, For testing purpose I was wonder what would be the >> best way to test this. I don't want to make the actual request during the >> test, because for one if

Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy <vbabi...@gmail.com> wrote: > Hello everyone, > > I am working on a project that will need to make a request out to the web > and pull down some data, For testing purpose I was wonder what would be the > best way to test this.

Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
Hello everyone, I am working on a project that will need to make a request out to the web and pull down some data, For testing purpose I was wonder what would be the best way to test this. I don't want to make the actual request during the test, because for one if I am off-line all those tests

Re: Testing uploads and content types

2009-01-23 Thread Julien Phalip
/docs.djangoproject.com/en/dev/topics/http/file-uploads/#upload... > > > > John > > > Hi John, > > > Thanks for your reply. The snippet you've given is the kind of things > > my view already does. The problem is that, when testing with > > self.client

Re: Testing uploads and content types

2009-01-23 Thread Malcolm Tredinnick
n, > > Thanks for your reply. The snippet you've given is the kind of things > my view already does. The problem is that, when testing with > self.client.post(), all files are systematically encoded as > 'application/octet-stream'. To test the behaviour of my view I need to > cont

Re: Testing uploads and content types

2009-01-23 Thread Julien Phalip
n't know if this will help you in your test. I hope it does. > > [1]http://docs.djangoproject.com/en/dev/topics/http/file-uploads/#upload... > > John Hi John, Thanks for your reply. The snippet you've given is the kind of things my view already does. The problem is that, when

Re: Testing uploads and content types

2009-01-23 Thread varikin
On Jan 23, 1:39 am, Julien Phalip wrote: > I have a view which processes a multi-part form and whose behaviour > varies depending on the content types of the uploaded files. I've > written some tests for that view as follows: > >         post_data = { >             'name1':

Testing uploads and content types

2009-01-22 Thread Julien Phalip
Hi, I have a view which processes a multi-part form and whose behaviour varies depending on the content types of the uploaded files. I've written some tests for that view as follows: post_data = { 'name1': 'blah', 'file_field1': image_data, }

Re: Why Django doesn't force testing?

2009-01-05 Thread Емил Иванов / Emil Ivanov
As Russell Keith-Magee suggested having a tutorial on how to do testing is a good way to go. Modifying the django tutorial in the docs to include testing in it should help new-commers get used to testing. Also, having tests in the docs should help convince people that testing is the right way

Re: Why Django doesn't force testing?

2009-01-05 Thread HB
> Your email client apparently failed to generate tests for your > message, resulting in a misunderstanding. Which leads us to that we should be forced to write tests, not encouraged :) On Jan 5, 3:30 pm, James Bennett wrote: > On Jan 5, 6:04 am, HB

Re: Why Django doesn't force testing?

2009-01-05 Thread James Bennett
On Jan 5, 6:04 am, HB wrote: > Sure, I mean encourage not force :) Your email client apparently failed to generate tests for your message, resulting in a misunderstanding. --~--~-~--~~~---~--~~ You received this message because you are

Re: Why Django doesn't force testing?

2009-01-05 Thread alex.gay...@gmail.com
e > valid. > When I say "encourage testing" I mean generating tests cases whenever > we create a Django entity (like model for example). > Creating integration testing (like Seam application tests). > Include code coverage tool. > Include code complexity tool. >

Re: Why Django doesn't force testing?

2009-01-05 Thread HB
I'm a Java guy playing around Django so what I will say may not be valid. When I say "encourage testing" I mean generating tests cases whenever we create a Django entity (like model for example). Creating integration testing (like Seam application tests). Include code coverage tool. In

Re: Why Django doesn't force testing?

2009-01-05 Thread Russell Keith-Magee
On Mon, Jan 5, 2009 at 9:04 PM, HB <hubaghd...@gmail.com> wrote: > > Sure, I mean encourage not force :) Ok, then - what could we do to encourage testing? We have a test framework; it is documented, there are plenty of blog entries around that discuss how to use it, and there are so

Re: Why Django doesn't force testing?

2009-01-05 Thread HB
Sure, I mean encourage not force :) On Jan 5, 1:53 pm, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Mon, 2009-01-05 at 03:27 -0800, HB wrote: > > Hey, > > One nice thing about JBoss Seam and Rails is they encourage unit > > testing from the very beginning.

Re: Why Django doesn't force testing?

2009-01-05 Thread Malcolm Tredinnick
On Mon, 2009-01-05 at 03:27 -0800, HB wrote: > Hey, > One nice thing about JBoss Seam and Rails is they encourage unit > testing from the very beginning. > Django as an agile web framework, why doesn't follow the same > philosophy? Your assumption seems to be mistaken. Djang

Re: Why Django doesn't force testing?

2009-01-05 Thread Manuel Schmidt
Why should django encourage? Django offers everything one needs to do it so if you want to unit test your code, you can just do it. And if you dont care, you can either. HB schrieb: > Hey, > One nice thing about JBoss Seam and Rails is they encourage unit > testing from the very

Re: Why Django doesn't force testing?

2009-01-05 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-01-05, o godz. 12:27, przez HB: > One nice thing about JBoss Seam and Rails is they encourage unit > testing from the very beginning. > Django as an agile web framework, why doesn't follow the same > philosophy? Because it's a "web framework"

Why Django doesn't force testing?

2009-01-05 Thread HB
Hey, One nice thing about JBoss Seam and Rails is they encourage unit testing from the very beginning. Django as an agile web framework, why doesn't follow the same philosophy? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Unit Testing forms with hidden fields

2008-12-08 Thread Jason Sidabras
hidden field also. > > > So when the send button is pushed it sends both the sender_id="2" (or > > whichever user) and the username="test_userwith_pk2" > > > So when I am testing and I have an anonymous user a simple post will > > work to test my

Re: Unit Testing forms with hidden fields

2008-12-08 Thread Malcolm Tredinnick
user is logged in the template > uses the pk_id from the user (in the case of non-admin pk=2 and up) > and then places the username a hidden field also. > > So when the send button is pushed it sends both the sender_id="2" (or > whichever user) and the username="test_

Re: Unit Testing forms with hidden fields

2008-12-08 Thread Jason Sidabras
-admin pk=2 and up) and then places the username a hidden field also. So when the send button is pushed it sends both the sender_id="2" (or whichever user) and the username="test_userwith_pk2" So when I am testing and I have an anonymous user a simple post will work to test my view

Re: Unit Testing forms with hidden fields

2008-12-08 Thread Malcolm Tredinnick
On Mon, 2008-12-08 at 15:00 -0800, Jason Sidabras wrote: > Hello, > > I am working on adding unit testing to my code and the snag I have > come across is in regards to unit fields. > > When user.is_anonymous() I have a hidden field sender_id = 1 which is > easy

Re: testing template tags

2008-12-02 Thread Richard Szopa
Thanks a lot. For some reason I haven't noticed the relevant fragment in the docs... Cheers, -- Richard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: testing template tags

2008-12-01 Thread Malcolm Tredinnick
fficient. Are you assuming that "manage.py test my_app" runs all doctests in every file? Because that isn't the case. Quoting http://docs.djangoproject.com/en/dev/topics/testing/ : For a given Django application, the test runner looks

testing template tags

2008-12-01 Thread Richard Szopa
Hello, I have written some doctests for my custom template tags, but `manage.py test my_app' doesn't seem to notice it. There is an __init__.py file in the templatetags directory, but apparently that is not sufficient. Thanks in advance, -- Richard

Re: Testing dynamic apps

2008-11-27 Thread Julien Phalip
On Nov 28, 1:21 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 11:21 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > I'm keen to try to find some proper ways to fix this, but before I go > > too deep into the

Re: Testing dynamic apps

2008-11-27 Thread Russell Keith-Magee
On Thu, Nov 27, 2008 at 11:21 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > I'm keen to try to find some proper ways to fix this, but before I go > too deep into the bowels of Django's testing framework, I was > wondering what would be the criticisms you'd have about the &quo

Re: Testing dynamic apps

2008-11-26 Thread Julien Phalip
I'm keen to try to find some proper ways to fix this, but before I go too deep into the bowels of Django's testing framework, I was wondering what would be the criticisms you'd have about the "solution" I came up with (at the start of this thread)? It sort of works without patch

Re: Testing dynamic apps

2008-11-26 Thread Rock
I took a similar path. I cloned the run_tests function from django.tests.simple.py and put it in my project directory as test_setup.py while adding this near the top of the function: if settings.TEST_APPS: settings.INSTALLED_APPS += settings.TEST_APPS That at least allows me to define

Re: Testing dynamic apps

2008-11-26 Thread Julien Phalip
On Nov 27, 10:55 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 27, 2008 at 8:33 AM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > So, all this works pretty well. The 'fakeapp' app is loaded > > dynamically, tables are created and the FakeItem model can be use in > > my

<    3   4   5   6   7   8   9   10   11   >