unit testing Q

2008-03-25 Thread Jeff Gentry
Hi there ... As a relative newcomer to Django, I recently starting looking at how best to implement unit tests for my app. I came across this page: http://www.djangoproject.com/documentation/testing/ as well as a couple of other examples online. If I'm understanding things correctly, the unit

Re: Questions related to testing Django application using Sqlite

2008-02-07 Thread Manoj Govindan
Hi Jacob, > > Under Sqlite tests run in an in-memory database, so this is perfectly > normal. Like you, I see about a 10x speedup running tests against > Sqlite. > Not surprisingly the tests slowed down once I added the TEST_DATABASE_NAME parameter to settings. It made debugging easier though.

Re: Questions related to testing Django application using Sqlite

2008-02-05 Thread Jacob Kaplan-Moss
On 2/5/08, Manoj Govindan <[EMAIL PROTECTED]> wrote: > Recently I tried using Sqlite instead of Postgres as the database > engine for testing one of my django applications. > My observations follow: > > 1) Tests ran significantly faster[1]. Under Sqlite tests run in an i

Questions related to testing Django application using Sqlite

2008-02-04 Thread Manoj Govindan
Recently I tried using Sqlite instead of Postgres as the database engine for testing one of my django applications. My observations follow: 1) Tests ran significantly faster[1]. 2) Some tests failed in Windows while some of them failed in both Windows and Linux. All tests succeeded in both

Re: testing and request.META['REMOTE_ADDR']

2008-01-05 Thread Thomas
re. (I might be completely wrong ...) Otherwise, REMOTE_ADDR in request is set either directly from remote_ip/client_address or from HTTP_X_FORWARDED_FOR using specific middleware. Regards, Thomas Malcolm Tredinnick wrote: > On Fri, 2008-01-04 at 14:30 -0800, Thomas wrote: &

Re: testing and request.META['REMOTE_ADDR']

2008-01-04 Thread Malcolm Tredinnick
On Fri, 2008-01-04 at 14:30 -0800, Thomas wrote: > I am testing django.contrib.comments with django.test.client that does > not provide request.META['REMOTE_ADDR'] and therefore dies at > http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/views/comment

testing and request.META['REMOTE_ADDR']

2008-01-04 Thread Thomas
I am testing django.contrib.comments with django.test.client that does not provide request.META['REMOTE_ADDR'] and therefore dies at http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/views/comments.py#L252 There has been a ticked #407 but that did not change all

Re: Recommended tool for web load & stress testing

2008-01-04 Thread Christian Vest Hansen
Interface is still a bit clunky - it's Swing after all, though not as bad as something like SoapUI (ugh). Stability is reasonable if don't mix java versions when doing distributed testing. On 1/3/08, mamcxyz <[EMAIL PROTECTED]> wrote: > > I remember use JMeter eons ago. I dislik

Re: Recommended tool for web load & stress testing

2008-01-03 Thread mamcxyz
I remember use JMeter eons ago. I dislike the clunky interface and the stability problems... Maybe is improved now? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Recommended tool for web load & stress testing

2008-01-03 Thread Christian Vest Hansen
Apache JMeter should be able to give you #1, #2 & #5 and can operate in a distributed fashion. On 1/2/08, Ryan K <[EMAIL PROTECTED]> wrote: > > For all your testing needs http://www.softwareqatest.com/qatweb1.html > > On Jan 2, 2:58 pm, mamcxyz <[EMAIL PROTECTED]&

Re: Recommended tool for web load & stress testing

2008-01-02 Thread Ryan K
For all your testing needs http://www.softwareqatest.com/qatweb1.html On Jan 2, 2:58 pm, mamcxyz <[EMAIL PROTECTED]> wrote: > Hi, > > I wonder what tool let me to do web load & stress testing with this > options: > > - Run on Windows, test target are windows & sol

Recommended tool for web load & stress testing

2008-01-02 Thread mamcxyz
Hi, I wonder what tool let me to do web load & stress testing with this options: - Run on Windows, test target are windows & solaris - Simulate diferent users, with separation of surfers vs content uploaders (ej: send photos, links, etc) - Tell me page size & maybe benefit

Easy to use web load/profiler testing

2007-12-17 Thread mamcxyz
I'm close to launch a redesing of www.paradondevamos.com, with social & multimedia capabilities. I wonder what kind of tool let me do load testing against the site. This is my base config: - I'm running under joyent "M" virtual server, so Solaris 10, 256 RAM. - I plan to use n

Re: Testing forms

2007-11-16 Thread Thomas Guettler
Responding to myself: I choosed solution 2 (parse HTML form) with the help of ClientForm: http://www.djangosnippets.org/snippets/467/ Comments welcome Am Freitag, 16. November 2007 13:03 schrieb Thomas Guettler: > Hi, > > my has a lot of input widgets which are build from several >

Testing forms

2007-11-16 Thread Thomas Guettler
Hi, my has a lot of input widgets which are build from several newform.form instances. If I want to test the form with client.post(), I need to pass all values of the input fields in a dictionary, even if I just want to modify one value. It would be nice if I could get all initial values in

Re: media directory for testing

2007-11-11 Thread Amit Ramon
_NAME"] Cheers, Amit ביום ראשון 11 נובמבר 2007, 02:43, נכתב על ידי Malcolm Tredinnick: > > On Sat, 2007-11-10 at 16:52 -0500, Faheem Mitha wrote: > > > > Hi. > > > > I'm having the following problem while testing. I'm writing a unit test > > for a fil

Re: media directory for testing

2007-11-10 Thread Malcolm Tredinnick
On Sat, 2007-11-10 at 16:52 -0500, Faheem Mitha wrote: > > Hi. > > I'm having the following problem while testing. I'm writing a unit test > for a file upload (using newforms). This works. However, the file gets > written to the same media directory as is used in norma

media directory for testing

2007-11-10 Thread Faheem Mitha
Hi. I'm having the following problem while testing. I'm writing a unit test for a file upload (using newforms). This works. However, the file gets written to the same media directory as is used in normal work. I'd prefer this happened somewhere where it would have no impact on normal

Re: How can I pass mock objects to views for testing purposes?

2007-11-02 Thread Manoj Govindan
> Django demonstrates at least one example of an alternative in its own > test framework, through the way that email is handled during testing. > Perfect! Thanks, Manoj --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: How can I pass mock objects to views for testing purposes?

2007-11-02 Thread Russell Keith-Magee
On 11/2/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > One of my applications has a view that uses a random number generator. > I am having some trouble passing a mock random generator to the view > for testing purposes. > I am relying on the mock object to get predictabl

How can I pass mock objects to views for testing purposes?

2007-11-02 Thread Manoj Govindan
One of my applications has a view that uses a random number generator. I am having some trouble passing a mock random generator to the view for testing purposes. I am relying on the mock object to get predictable results for testing the view's logic. After several attempts I came up with an URL

Re: testing filesystem operations in Django

2007-10-27 Thread Tom Badran
> Hi, > > Here is a simple question about testing. I have a django file upload > application which needs to operate on the filesystem as part of its > functionality (create files/directories etc. under media root) I use > Debian etch. So, I want a way to test filesystem operations, pre

testing filesystem operations in Django

2007-10-27 Thread Faheem Mitha
Hi, Here is a simple question about testing. I have a django file upload application which needs to operate on the filesystem as part of its functionality (create files/directories etc. under media root) I use Debian etch. So, I want a way to test filesystem operations, preferably without

weird bug encountered during testing

2007-10-10 Thread Ronald
Hi everyone, i can use some help here. Im doing some unittesting for my app (yep i finally decided to start testing my code) and encountered a strange "bug". basically, I follow the testing documentation and try to do a get request and then test the response context using somethi

Re: testing questions

2007-09-16 Thread Russell Keith-Magee
are very easy to read (and thus validate); unittests have more infrastructure, so they can make some complex tests easier to set up. A good test suite will probably use elements of both. > 2) Is it recommended to have unit tests within each class in the > models.py file or in a separate

testing questions

2007-09-16 Thread john
coming from Rails so any help appreciated 1) I realize you can use doctests or unit tests - but is one recommended over the other ? 2) Is it recommended to have unit tests within each class in the models.py file or in a separate testing file ? 3) Fixtures using json (I assume json

Re: Testing/Fixtures/Production/TestRunner

2007-08-30 Thread Chris Green
[ Sorry for long delay, django is one of my "also projects" ] On Aug 11, 11:15 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > As for how to fix this problem, I have two suggestions. > > 1) Are you sure you can't just fix this with a static fixture? Yes, that should work just fine. The

Re: basic testing procedure?

2007-08-14 Thread patrickk
thanks for all the answers and your patience. got the basic testing- setup now ... patrick --~--~-~--~~~---~--~~ 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: basic testing procedure?

2007-08-13 Thread Tim Chase
> self.assertEquals(list(self.movie.details_genre.all()), "[ Action-Komödie>, ]") > ... > > output: > AssertionError: [, ] ! > = '[, \xc3\xb6die>]' First, it looks like you're comparing a list of objects to a string. I'm not sure if QuerySets override the magic method to determine if they're

Re: basic testing procedure?

2007-08-13 Thread patrickk
that has list-like behaviors. > However, it isn't a list and thus (as you discovered) likely has > trouble when testing for equality with a list-object. You can > try either > > self.assertEquals(list(self.movie.details_country.all()), []) >

Re: basic testing procedure?

2007-08-13 Thread patrickk
AIL PROTECTED]> wrote: > On 8/13/07, patrickk <[EMAIL PROTECTED]> wrote: > > > > > thanks russ. > > > is it possible to make the testing-output more verbose? I tried "-v", > > but that doesn´t work. It´d be nice to see what tests have been > > r

Re: basic testing procedure?

2007-08-13 Thread Russell Keith-Magee
On 8/13/07, patrickk <[EMAIL PROTECTED]> wrote: > > thanks russ. > > is it possible to make the testing-output more verbose? I tried "-v", > but that doesn´t work. It´d be nice to see what tests have been > running and what the output is (more than just

Re: basic testing procedure?

2007-08-13 Thread eXt
On 13 Sie, 09:48, patrickk <[EMAIL PROTECTED]> wrote: > thanks russ. > > is it possible to make the testing-output more verbose? I tried "-v", > but that doesn´t work. It´d be nice to see what tests have been > running and what the output is (more than just "

Re: basic testing procedure?

2007-08-13 Thread patrickk
thanks russ. is it possible to make the testing-output more verbose? I tried "-v", but that doesn´t work. It´d be nice to see what tests have been running and what the output is (more than just "OK"). in the django-docs it says, that doctests provide automatic documentatio

Re: Developing and testing a model mixin

2007-08-12 Thread Ned
On Aug 12, 4:35 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > This is one approach - another would be an abstract base class. Great. > The simplest approach would be to write a simple test app, use the > normal Django test framework on that app, and then not install/include > that test

Re: Testing/Fixtures/Production/TestRunner

2007-08-11 Thread Russell Keith-Magee
r gets blown > > > away by the TestCase architecture. Works as documented. However, I'm > > > not sure where I should put things that should happen post-each syncdb > > > for testing only. Should there be a testrunner function that gets > > > called post each syn

Re: basic testing procedure?

2007-08-11 Thread Russell Keith-Magee
On 8/10/07, patrickk <[EMAIL PROTECTED]> wrote: > > here are a couple of questions: > 1. where to define the testing? in models.py or in tests.py? I´d like > to seperate the testing from models.py, so how can I write doctests > in a seperate file (the example in the djan

Re: Developing and testing a model mixin

2007-08-11 Thread Russell Keith-Magee
ly implement abstract base classes is one of the goals of this work. > But management.syncdb() doesn't create any tables, which is because it > doesn't have any INSTALLED_APPS. But I don't have any django apps, > just a handful of testing classes. If you're going to test some functionalit

Developing and testing a model mixin

2007-08-11 Thread Ned
() family = models.IntegerField() identifying_columns = (family,owner) SimpleTreeNodes can now be used as a tree structure. Firstly, is a mixin a good way to do this? Secondly, I'm having a nightmare trying to set up testing for this class outside of a DJango installation. Basically, I'm

Re: Testing/Fixtures/Production/TestRunner

2007-08-10 Thread Chris Green
ecture. Works as documented. However, I'm > > not sure where I should put things that should happen post-each syncdb > > for testing only. Should there be a testrunner function that gets > > called post each sync or should I create a single TestCase derived > > from django.t

Re: basic testing procedure?

2007-08-10 Thread Tim Chase
ame your app "tests" (such as you're writing academic software or software whose purpose is testing the user or something they have), I would avoid tempting fate by using "tests" as my appname. I just create a folder called "tests/" within my regular app. As for y

Re: basic testing procedure?

2007-08-10 Thread patrickk
0, 2:19 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > 1. where to define the testing? in models.py or in tests.py? I´d like > > to seperate the testing from models.py, so how can I write doctests > > in a seperate file (the example in the django documentation only > >

Re: basic testing procedure?

2007-08-10 Thread Tim Chase
> 1. where to define the testing? in models.py or in tests.py? I´d like > to seperate the testing from models.py, so how can I write doctests > in a seperate file (the example in the django documentation only > explains seperate unit-testing)? my understanding is that docte

basic testing procedure?

2007-08-10 Thread patrickk
I´ve been reading the slides for "Django Master Class" and the django documentation on testing, but I´m still not sure how to actually do some testing. here are a couple of questions: 1. where to define the testing? in models.py or in tests.py? I´d like to seperate the te

Re: Testing/Fixtures/Production/TestRunner

2007-08-09 Thread Russell Keith-Magee
called "constant_data". The fixtures > documentation in testing does say it gets synched each time but also > says its purpose is to populate the initial empty new database. There is an argument to be made that initial_data for a model should only be loaded once - when the model

Re: testing

2007-08-09 Thread [EMAIL PROTECTED]
Для тестов существуют модули doctest и unittest, попробуй почитать документацию :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Testing/Fixtures/Production/TestRunner

2007-08-08 Thread Chris Green
authentication middleware (I use CAS for production but local accounts work just fine for unittesting) 3) Add testcases that aren't related to INSTALLED_APPLICATIONS 4) unittest.TestCase()s I've been adding most data manually for testing but would like to move towards using fixtures. Seems like a good job

testing

2007-08-08 Thread nikolay marinov
Hi,there.I'm a young tester (4 months,still learning what is "testing software!?!"). I work on Linux and i write my tests with Python. Our assignment is to build a module from our 'BIG' program that have to be able to edit xls files, without using MSExcel, OpenOffice or some

Re: db mock for unit testing

2007-07-31 Thread Andrey Khavryuchenko
Russ, RK> On 7/29/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: >> >> I'm not using django's testing framework for several reasons: >> - I'm using django from 0.91 days and wasn't following django-users all >> this way >> - I use nose and t

Re: db mock for unit testing

2007-07-31 Thread Andrey Khavryuchenko
Russ, RK> On 7/29/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> >> So what advantages are there to the mocking approach over just replacing >> the setting? RK> Genuine mocking (as opposed to this proposal) has one really big RK> advantage - it's lightning fast. All the db-calls

Re: db mock for unit testing

2007-07-29 Thread Russell Keith-Magee
On 7/29/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > So what advantages are there to the mocking approach over just replacing > the setting? Genuine mocking (as opposed to this proposal) has one really big advantage - it's lightning fast. All the db-calls get faked using a cache-like

Re: db mock for unit testing

2007-07-29 Thread Russell Keith-Magee
On 7/29/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: > > I'm not using django's testing framework for several reasons: > - I'm using django from 0.91 days and wasn't following django-users all >this way > - I use nose and twill for testing and they have

Re: db mock for unit testing

2007-07-29 Thread Andrey Khavryuchenko
Malcolm, MT> That isn't an answer to the question Russell asked, though. You can get MT> exactly the same end-effect (using in-memory SQLite) if you specify MT> SQLite as the database engine in the settings file you use for testing. MT> Deriving your testing settings file f

Re: db mock for unit testing

2007-07-28 Thread Malcolm Tredinnick
tests. > Mocking them into in-memory sqlite was the simplest way to reach this w/o > losing flexibility. That isn't an answer to the question Russell asked, though. You can get exactly the same end-effect (using in-memory SQLite) if you specify SQLite as the database engine in the settings f

Re: db mock for unit testing

2007-07-28 Thread Andrey Khavryuchenko
Russell, RK> On 7/27/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: >> >> Then I've paused and wrote DbMock class for django that uses some black >> magic to steal django db connection and substitute it with temporary sqlite >> in-memory db. RK> How is this different to the default

Re: db mock for unit testing

2007-07-27 Thread Russell Keith-Magee
On 7/27/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: > > Then I've paused and wrote DbMock class for django that uses some black > magic to steal django db connection and substitute it with temporary sqlite > in-memory db. How is this different to the default Django behavior if you

db mock for unit testing

2007-07-27 Thread Andrey Khavryuchenko
I do hardcore test-driven development and hate when tests hit my mysql database (even local one). Things get only worse when testcases start demanding radically different datasets. Then I've paused and wrote DbMock class for django that uses some black magic to steal django db connection and

Re: learning django testing

2007-07-26 Thread james_027
Thanks bob cheers, james On Jul 25, 11:48 pm, "Bob T." <[EMAIL PROTECTED]> wrote: > > I don't have any idea what is the > > testing all about. > > James, you might want to take a look at Dive Into Python [1] as a > starting place. It has a couple good

Re: learning django testing

2007-07-25 Thread Bob T.
> I don't have any idea what is the > testing all about. James, you might want to take a look at Dive Into Python [1] as a starting place. It has a couple good chapters on testing and test driven development. Bob [1] http://diveintopython.org/unit_testing/inde

learning django testing

2007-07-24 Thread james_027
hi, Here's another newbie stupid question ... I've heard testing everywhere from software development world, and the testing I know is to run the application I am developing and do all the possibilities that I user might do to make sure that the application behaves how it should be. I am

Re: Testing Views

2007-06-21 Thread [EMAIL PROTECTED]
the dict was supposed to be passing in the logged user, though I am starting to think I don't need to pass anything as long as I can get the session set. Another developer in the office wrote the auth code so it took me a bit to get a handle on just what it was doing. I am thinking if i get the

Re: Testing Views

2007-06-21 Thread Jeremy Dunck
On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Jeremy, >Thanks for the response. > > to be more clear maybe - >i was actually trying to pass the dictionary as part of the request > object - since the view looks for the logged participant in the > request from the page. > >

Re: Testing Views

2007-06-21 Thread [EMAIL PROTECTED]
Jeremy, Thanks for the response. to be more clear maybe - i was actually trying to pass the dictionary as part of the request object - since the view looks for the logged participant in the request from the page. what if my view does not take a qstring? I need to pass it some pieces in

Re: Testing Views

2007-06-21 Thread Jeremy Dunck
On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > response = self.client.get('/broadcasts/new/', > {'loggedParticipant': participant} ) It's not clear to me what the dictionary there is meant to do. That dictionary is passed as the querystring, *not* as the session. Also,

Testing Views

2007-06-21 Thread [EMAIL PROTECTED]
I am in the process of working up my unit tests for an app set to release pretty soon, the issue I am having is with getting the unit tests for my views to run properly. The issue is that in each view I have a login check for a custom login function (we could not use the django auth system

Re: Captcha module Version 1.1 ready for testing

2007-06-15 Thread Forest Bond
On Fri, Jun 15, 2007 at 09:48:02AM -0400, Forest Bond wrote: > Do note that it must be symmetric, since you need to be able to decrypt the > answer. Sorry, this is not true. It must not be a hash, anyway, and I don't see the benefit of using public key crypto here. To me, it makes the most

Re: Captcha module Version 1.1 ready for testing

2007-06-15 Thread Forest Bond
On Fri, Jun 15, 2007 at 09:55:30AM +0200, Martin Winkler wrote: > > Am Thu, 14 Jun 2007 15:51:10 -0400 > schrieb Forest Bond <[EMAIL PROTECTED]>: > > > You can do it without external persistence (sessions and/or database > > table) by encrypting the correct response in the image filename. > >

Re: Captcha module Version 1.1 ready for testing

2007-06-15 Thread Martin Winkler
Am Fri, 15 Jun 2007 14:53:59 +0800 schrieb "Nimrod A. Abing" <[EMAIL PROTECTED]>: > I will be downloading your module and testing it out soon. Cool! I'd love to get some feedback especially with different setup than I have. > If I have patches for your module, do I

Re: Captcha module Version 1.1 ready for testing

2007-06-15 Thread Martin Winkler
Am Thu, 14 Jun 2007 15:51:10 -0400 schrieb Forest Bond <[EMAIL PROTECTED]>: > You can do it without external persistence (sessions and/or database > table) by encrypting the correct response in the image filename. So when the request to get the image is sent to django, we have to decrypt the

Re: Captcha module Version 1.1 ready for testing

2007-06-15 Thread Nimrod A. Abing
ers - the captcha test > is also successful, even if the image also shows uppercase characters) Yes, that was actually one of the requirements for my project: to make sure that lazy users are taken into account :) I will be downloading your module and testing it out soon

Re: Captcha module ready for testing

2007-06-14 Thread Iapain
Hi, Nice implementation but dont see any logic to save captcha temporary, you should add option like "nosave" and use cStringIO in that case. Cheers, Deepak On Jun 13, 5:11 pm, MartinWinkler <[EMAIL PROTECTED]> wrote: > Hi all, > > I just uploaded the captcha module I recently mentioned >

Re: Captcha module Version 1.1 ready for testing

2007-06-14 Thread Forest Bond
On Thu, Jun 14, 2007 at 08:14:54PM +0200, Martin Winkler wrote: > Am Thu, 14 Jun 2007 12:00:11 +0800 > schrieb "Nimrod A. Abing" <[EMAIL PROTECTED]>: > > > Are you planning to implement a configuration to allow in-memory > > images? > > One thing that annoys me with in-memory images is that you

Re: Captcha module Version 1.1 ready for testing

2007-06-14 Thread Martin Winkler
g outdated captchas. FIXED * new configuration options * save as gif image with adaptive color palette to minimize filespace. if it*s not possible to save as gif, it falls back to jpg. (I had a problem on FreeBSD with gif images) * there is now an "iterations" option - which wr

Re: Captcha module ready for testing

2007-06-13 Thread Nimrod A. Abing
Hello, I am about to try your module and I haven't downloaded it yet but I have a few questions and some suggestions. I have my own CAPTCHA module too which is slightly different from yours in some respects: 1. It does not need a dedicated directory to save image files. Images are created

Re: Captcha module ready for testing

2007-06-13 Thread Martin Winkler
Am Wed, 13 Jun 2007 18:47:10 - schrieb JustJohnny <[EMAIL PROTECTED]>: > I just installed your captcha module. I'm not sure if it was me, my > setup or the code but I kept getting a 'help_text' error. That is very strange - help_text is part of django's newforms fields. I tried to reproduce

Re: Captcha module ready for testing

2007-06-13 Thread JustJohnny
Martin, I just installed your captcha module. I'm not sure if it was me, my setup or the code but I kept getting a 'help_text' error. I ended up removing all references to help text from captcha/__init__.py", line 169 and other areas. After I got past that, I discovered that I needed to

Captcha module ready for testing

2007-06-13 Thread MartinWinkler
Hi all, I just uploaded the captcha module I recently mentioned to http://django.agami.at/media/captcha/ Please take a look at it and tell me what you think of it. I really hope this module can be put into the trunk on django.contrib some day. Maybe one of the lead developers can take a look

Re: automated testing of django apps via browser

2007-06-03 Thread Russell Keith-Magee
On 6/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Has anybody experience in selenium and django ? > > During ./manage test there are mechanism to load fixtures, which I tried to > use. During first tests with selenium I need to run ./manage runserver on my > test system. Since the

automated testing of django apps via browser

2007-06-03 Thread dummy
Hi all, I currently working on an company application which needs a lot of automated tests to make sure that changes on code won't break usability for out production environment. I wrote doctests for our models via models.py. I wrote small application tests via TestCases. Until now I have

Re: newforms + testing

2007-05-28 Thread [EMAIL PROTECTED]
New update, I used ModelChoiceFields and ModelMultipleChoiceFields. Problem solved :) On May 23, 9:01 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I wrote a newforms form, but I have some problems when I want to test > the class. Here's the definition: > > def _users(): >

Re: newforms + testing

2007-05-23 Thread Malcolm Tredinnick
On Wed, 2007-05-23 at 06:01 -0700, [EMAIL PROTECTED] wrote: > Hello, > > I wrote a newforms form, but I have some problems when I want to test > the class. Here's the definition: > > def _users(): > print "calling _users()" > return [(u.id, u.get_full_name()) for u in >

Re: newforms + testing

2007-05-23 Thread Doug B
If you put the call to your _users() function in the form __init__() I think it will be what you are looking for. initi s called automatically whenever an instance is created. class MemoForm(forms.Form): -snip- def __init__(self,*args,**kwarg)

Re: newforms + testing

2007-05-23 Thread Doug B
If you put the call to your _users() function in the form __init__() I think it will be what you are looking for. initi s called automatically whenever an instance is created. class MemoForm(forms.Form): -snip- def __init__(self,*args,**kwarg)

Re: newforms + testing

2007-05-23 Thread Doug B
If you put the call to your _users() function in the form __init__() I think it will be what you are looking for. initi s called automatically whenever an instance is created. class MemoForm(forms.Form): -snip- def __init__(self,*args,**kwarg)

Re: newforms + testing

2007-05-23 Thread [EMAIL PROTECTED]
I fixed my problem, but it's very much a hack. If anyone has a better solution, please post it. My fix was a simple hack: after every instantiation of my MemoForm class, I called a method "replace_recipients" where I changed the value of form_object.base_fields['recipients'].choices. Like I

Re: newforms + testing

2007-05-23 Thread [EMAIL PROTECTED]
I fixed my problem, but it's very much a hack. If anyone has a better solution, please post it. My fix was a simple hack: after every instantiation of my MemoForm class, I called a method "replace_recipients" where I changed the value of form_object.base_fields['recipients'].choices. Like I

Re: newforms + testing

2007-05-23 Thread [EMAIL PROTECTED]
I fixed my problem, but it's very much a hack. If anyone has a better solution, please post it. My fix was a simple hack: after every instantiation of my MemoForm class, I called a method "replace_recipients" where I changed the value of form_object.base_fields['recipients'].choices. Like I

Re: newforms + testing

2007-05-23 Thread [EMAIL PROTECTED]
I fixed my problem, but it's very much a hack. If anyone has a better solution, please post it. My fix was a simple hack: after every instantiation of my MemoForm class, I called a method "replace_recipients" where I changed the value of form_object.base_fields['recipients'].choices. Like I

newforms + testing

2007-05-23 Thread [EMAIL PROTECTED]
Hello, I wrote a newforms form, but I have some problems when I want to test the class. Here's the definition: def _users(): print "calling _users()" return [(u.id, u.get_full_name()) for u in User.objects.filter(is_active=True)] class MemoForm(forms.Form): body =

Re: Testing Framework and Fixtures

2007-04-11 Thread Russell Keith-Magee
On 4/12/07, Brian Luft <[EMAIL PROTECTED]> wrote: > > If I remember correctly, my problem was that the JSON serializer was > bombing out when encountering float fields. I didn't report it > directly because I thought I had remembered seeing others report > similar problems. It was probably a

Re: Testing Framework and Fixtures

2007-04-11 Thread Brian Luft
If I remember correctly, my problem was that the JSON serializer was bombing out when encountering float fields. I didn't report it directly because I thought I had remembered seeing others report similar problems. It was probably a late night and I got around it by opting for XML formatting.

Re: Testing Framework and Fixtures

2007-04-11 Thread Russell Keith-Magee
On 4/12/07, Merric Mercer <[EMAIL PROTECTED]> wrote: > > I tried to run the dumpdata command because I'd read that this did much > of the work for me but I received the following error message > > >>C:\>manage.py dumpdata promotions > Unable to serialize database: Table_Code matching query does

Re: Testing Framework and Fixtures

2007-04-11 Thread Russell Keith-Magee
On 4/12/07, Brian Luft <[EMAIL PROTECTED]> wrote: > > I've run into problems as well with the fixture functionality. The > short of it is that this is a new feature to the framework and likely > the kinks will be worked out in the coming weeks. Have you reported these problems? I am aware of

Re: Testing Framework and Fixtures

2007-04-11 Thread Brian Luft
to create a > fixture for the testing framework. Could someone provide an example of > the format of a > fixture ? > > I tried to run the dumpdata command because I'd read that this did much > of the work for me but I received the following error message > > >>C:\

Testing Framework and Fixtures

2007-04-11 Thread Merric Mercer
Being a relative newbie I don't really understand how to create a fixture for the testing framework. Could someone provide an example of the format of a fixture ? I tried to run the dumpdata command because I'd read that this did much of the work for me but I received the following error

Re: XML-RPC call for django unit testing

2007-03-30 Thread Russell Keith-Magee
On 3/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi > I 'm trying to test django app using built-in django unit > testing. Some of it make a call to xml-rpc server using xmlrpclib. > Now, I use django testing framework and can run unit testing except

XML-RPC call for django unit testing

2007-03-29 Thread meledictas
Hi I 'm trying to test django app using built-in django unit testing. Some of it make a call to xml-rpc server using xmlrpclib. Now, I use django testing framework and can run unit testing except that I can't enable in-process xml-rpc server. My idea is, create xml-rpc server mock

How to use xmlrpclib Server with django unit testing

2007-03-27 Thread meledictas
I have tested using xmlrpclib and got connection refused. Thank --~--~-~--~~~---~--~~ 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

Re: Testing Django App Running on Dev Server with Selenium

2007-03-11 Thread Paul Childs
Thanks for the suggestion Grig. I'll give it a shot on Monday. /Paul On 3/10/07, Grig <[EMAIL PROTECTED]> wrote: > > Paul -- have you tried running the Selenium RC server non- > interactively, then interacting with it via one of the languages it > supports? Python for example, since you're doing

Re: Testing Django App Running on Dev Server with Selenium

2007-03-10 Thread Grig
Paul -- have you tried running the Selenium RC server non- interactively, then interacting with it via one of the languages it supports? Python for example, since you're doing Django development. Look in the python sub-directory of the selenium-rc distribution, and modify the test_google.py

<    5   6   7   8   9   10   11   >