Re: Testing django

2023-03-16 Thread Ayush Bisht
Yeah, I got you..
My concern is on the documentation, the way it has provided the commands
for executing test cases.

That
path.to.settings seems confusing sometimes..

On Fri, 17 Mar, 2023, 1:20 am Bhuvnesh Sharma, 
wrote:

> We can run django tests with custom settings by using --settings flag and
> providing the path to the custom settings file . For example:
> ./runtests.py --settings=new_app.test_settings
>
> What do you want to do exactly?
>
> On Fri, Mar 17, 2023 at 1:00 AM Ayush Bisht 
> wrote:
>
>> Seems like, it is for defining how actually we are selecting the specific
>> test case. It is very confusing at first.
>> Can't we just explain it with an example..
>>
>> On Friday, March 17, 2023 at 12:54:27 AM UTC+5:30 Ayush Bisht wrote:
>>
>>> * ./runtests.py --settings=path.to.settings i18n.tests.TranslationTests*
>>>
>>> what exactly is the purpose of *path.to.settings,* I'm getting an error
>>> while running the above line.
>>> Can anyone please explain?
>>>
>>> *Error*
>>> Testing against Django installed in '/home/ayush/OS/django/django' with
>>> up to 8 processes
>>> Traceback (most recent call last):
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 770, in 
>>> failures = django_tests(
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 398, in
>>> django_tests
>>> test_labels, state = setup_run_tests(*process_setup_args)
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 300, in
>>> setup_run_tests
>>> test_modules, state = setup_collect_tests(
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 201, in
>>> setup_collect_tests
>>> "INSTALLED_APPS": settings.INSTALLED_APPS,
>>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 84, in
>>> __getattr__
>>> self._setup(name)
>>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 71, in
>>> _setup
>>> self._wrapped = Settings(settings_module)
>>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 185, in
>>> __init__
>>> mod = importlib.import_module(self.SETTINGS_MODULE)
>>>   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in
>>> import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>   File "", line 1050, in _gcd_import
>>>   File "", line 1027, in _find_and_load
>>>   File "", line 992, in
>>> _find_and_load_unlocked
>>>   File "", line 241, in
>>> _call_with_frames_removed
>>>   File "", line 1050, in _gcd_import
>>>   File "", line 1027, in _find_and_load
>>>   File "", line 992, in
>>> _find_and_load_unlocked
>>>   File "", line 241, in
>>> _call_with_frames_removed
>>>   File "", line 1050, in _gcd_import
>>>   File "", line 1027, in _find_and_load
>>>   File "", line 1004, in
>>> _find_and_load_unlocked
>>> ModuleNotFoundError: No module named 'path'
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/dd827ca8-704e-4ffc-8d7a-2c56d100cdd7n%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BZJHEqMWEj8dE9gpVW0f5QajXy1b9GPp-Qur4457GMoWAoUbQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%2BM4H5-M%2B6T5PvfctNYJR7o0ebry_4f-JUGec8QewJs%2BhASNg%40mail.gmail.com.


Re: Testing django

2023-03-16 Thread Bhuvnesh Sharma
We can run django tests with custom settings by using --settings flag and
providing the path to the custom settings file . For example:
./runtests.py --settings=new_app.test_settings

What do you want to do exactly?

On Fri, Mar 17, 2023 at 1:00 AM Ayush Bisht 
wrote:

> Seems like, it is for defining how actually we are selecting the specific
> test case. It is very confusing at first.
> Can't we just explain it with an example..
>
> On Friday, March 17, 2023 at 12:54:27 AM UTC+5:30 Ayush Bisht wrote:
>
>> * ./runtests.py --settings=path.to.settings i18n.tests.TranslationTests*
>>
>> what exactly is the purpose of *path.to.settings,* I'm getting an error
>> while running the above line.
>> Can anyone please explain?
>>
>> *Error*
>> Testing against Django installed in '/home/ayush/OS/django/django' with
>> up to 8 processes
>> Traceback (most recent call last):
>>   File "/home/ayush/OS/django/tests/./runtests.py", line 770, in 
>> failures = django_tests(
>>   File "/home/ayush/OS/django/tests/./runtests.py", line 398, in
>> django_tests
>> test_labels, state = setup_run_tests(*process_setup_args)
>>   File "/home/ayush/OS/django/tests/./runtests.py", line 300, in
>> setup_run_tests
>> test_modules, state = setup_collect_tests(
>>   File "/home/ayush/OS/django/tests/./runtests.py", line 201, in
>> setup_collect_tests
>> "INSTALLED_APPS": settings.INSTALLED_APPS,
>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 84, in
>> __getattr__
>> self._setup(name)
>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 71, in _setup
>> self._wrapped = Settings(settings_module)
>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 185, in
>> __init__
>> mod = importlib.import_module(self.SETTINGS_MODULE)
>>   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in
>> import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>>   File "", line 1050, in _gcd_import
>>   File "", line 1027, in _find_and_load
>>   File "", line 992, in
>> _find_and_load_unlocked
>>   File "", line 241, in
>> _call_with_frames_removed
>>   File "", line 1050, in _gcd_import
>>   File "", line 1027, in _find_and_load
>>   File "", line 992, in
>> _find_and_load_unlocked
>>   File "", line 241, in
>> _call_with_frames_removed
>>   File "", line 1050, in _gcd_import
>>   File "", line 1027, in _find_and_load
>>   File "", line 1004, in
>> _find_and_load_unlocked
>> ModuleNotFoundError: No module named 'path'
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dd827ca8-704e-4ffc-8d7a-2c56d100cdd7n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BZJHEqMWEj8dE9gpVW0f5QajXy1b9GPp-Qur4457GMoWAoUbQ%40mail.gmail.com.


Re: Testing django

2023-03-16 Thread Ayush Bisht
Seems like, it is for defining how actually we are selecting the specific 
test case. It is very confusing at first. 
Can't we just explain it with an example..

On Friday, March 17, 2023 at 12:54:27 AM UTC+5:30 Ayush Bisht wrote:

> * ./runtests.py --settings=path.to.settings i18n.tests.TranslationTests*
>
> what exactly is the purpose of *path.to.settings,* I'm getting an error 
> while running the above line.
> Can anyone please explain?
>
> *Error*  
> Testing against Django installed in '/home/ayush/OS/django/django' with up 
> to 8 processes
> Traceback (most recent call last):
>   File "/home/ayush/OS/django/tests/./runtests.py", line 770, in 
> failures = django_tests(
>   File "/home/ayush/OS/django/tests/./runtests.py", line 398, in 
> django_tests
> test_labels, state = setup_run_tests(*process_setup_args)
>   File "/home/ayush/OS/django/tests/./runtests.py", line 300, in 
> setup_run_tests
> test_modules, state = setup_collect_tests(
>   File "/home/ayush/OS/django/tests/./runtests.py", line 201, in 
> setup_collect_tests
> "INSTALLED_APPS": settings.INSTALLED_APPS,
>   File "/home/ayush/OS/django/django/conf/__init__.py", line 84, in 
> __getattr__
> self._setup(name)
>   File "/home/ayush/OS/django/django/conf/__init__.py", line 71, in _setup
> self._wrapped = Settings(settings_module)
>   File "/home/ayush/OS/django/django/conf/__init__.py", line 185, in 
> __init__
> mod = importlib.import_module(self.SETTINGS_MODULE)
>   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in 
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1050, in _gcd_import
>   File "", line 1027, in _find_and_load
>   File "", line 992, in 
> _find_and_load_unlocked
>   File "", line 241, in 
> _call_with_frames_removed
>   File "", line 1050, in _gcd_import
>   File "", line 1027, in _find_and_load
>   File "", line 992, in 
> _find_and_load_unlocked
>   File "", line 241, in 
> _call_with_frames_removed
>   File "", line 1050, in _gcd_import
>   File "", line 1027, in _find_and_load
>   File "", line 1004, in 
> _find_and_load_unlocked
> ModuleNotFoundError: No module named 'path'
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dd827ca8-704e-4ffc-8d7a-2c56d100cdd7n%40googlegroups.com.


Re: Testing Django User Login Form

2021-04-23 Thread lone...@gmail.com
Thank you for the reply!  I will totally try this tonight!

On Thursday, April 22, 2021 at 7:31:40 PM UTC-4 David Nugent wrote:

> Try creating a request using RequestFactory and use that to input the 
> credentials. I don't think the way you are creating the form is valid.
>
> rf = RequestFactory()
> request = rf.post('/some_mock_url', dict(username='abc', 
> password='password'))
> form = AuthenticationForm(request)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e3079f83-6175-4852-9a6a-f94625079af4n%40googlegroups.com.


Re: Testing Django User Login Form

2021-04-22 Thread David Nugent
Try creating a request using RequestFactory and use that to input the
credentials. I don't think the way you are creating the form is valid.

rf = RequestFactory()
request = rf.post('/some_mock_url', dict(username='abc',
password='password'))
form = AuthenticationForm(request)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE5VhgWBM7dqPBzMc4P8eGCOuksM54kcnPnVA83ciE93C6bqWw%40mail.gmail.com.


Re: testing django migrations

2015-12-27 Thread Gergely Polonkai
I'm also interested in that, except that I'd like to test RunPython steps.
On Dec 28, 2015 12:32 AM, "Dan Tagg"  wrote:

> Hi,
>
> I used this:
> https://github.com/plumdog/django_migration_testcase
>
> It's only worth writing tests if you are modifying code created by
> makemigrations.
>
> Dan
>
> On 27 December 2015 at 10:14, varun naganathan <
> varunnaganathan...@gmail.com> wrote:
>
>> Hi,I wanted to know how am i supposed to test the working of django
>> migrations.As in how the migrations generate the SQL query.Basically I want
>> to inspect how the sql query generated as in the output of "./manage.py
>> sqlmigrate" is being generated.I've generally used "pdb" along wth
>> unittest.TestCase,but for migrations I'm pretty much stuck.Does anyone
>> probably have a sample test they wrote to test the django migrations.
>> Thanks in advance.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b6364f7e-56ab-4682-ad0a-3684e6199c8f%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Wildman and Herring Limited, Registered Office: 52 Great Eastern Street,
> London, EC2A 3EP, Company no: 05766374
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPZHCY5CJ_9jex%2BnKNi%3DCy2XG9X9zrLS%3DJBW-mUmDoCpK6%2BTPA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBUL7z8M8nPbsAO2jM2EvyMCqxT4JJVGGSvA8MW__a8E6VQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: testing django migrations

2015-12-27 Thread Dan Tagg
Hi,

I used this:
https://github.com/plumdog/django_migration_testcase

It's only worth writing tests if you are modifying code created by
makemigrations.

Dan

On 27 December 2015 at 10:14, varun naganathan  wrote:

> Hi,I wanted to know how am i supposed to test the working of django
> migrations.As in how the migrations generate the SQL query.Basically I want
> to inspect how the sql query generated as in the output of "./manage.py
> sqlmigrate" is being generated.I've generally used "pdb" along wth
> unittest.TestCase,but for migrations I'm pretty much stuck.Does anyone
> probably have a sample test they wrote to test the django migrations.
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b6364f7e-56ab-4682-ad0a-3684e6199c8f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Wildman and Herring Limited, Registered Office: 52 Great Eastern Street,
London, EC2A 3EP, Company no: 05766374

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPZHCY5CJ_9jex%2BnKNi%3DCy2XG9X9zrLS%3DJBW-mUmDoCpK6%2BTPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing Django: testing template at different time

2015-03-18 Thread Zaki Akhmad
On Fri, Mar 13, 2015 at 5:32 AM, Collin Anderson  wrote:
> Hi,
>
> You could try using freezegun to run the test as if it were a certain time
> of day.
> https://pypi.python.org/pypi/freezegun

Hi Collin,

thanks for the response.
After spent some time, finally I managed to get the testing.

I put my code snippets here
https://gist.github.com/za/2a217c47582737f88259

> Or, you could say something like:
> if 9 <= datetime.datetime.now().hour < 17:
> self.assertContains(response, "It's working time!")
> else:
> self.assertContains(response, "Happy holiday!")
>
> That way it will at least not fail (most of the time :).

Yes, but my mentor said it's not best practice in testing because we
want to test all the condition whenever we execute the test code.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE7Ck-TX83e9Qt_Xm35rqUzWNBP%2Be_QtE5%3Dicz7_Ydx1-spQuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing Django: testing template at different time

2015-03-12 Thread Collin Anderson
Hi,

You could try using freezegun to run the test as if it were a certain time 
of day.
https://pypi.python.org/pypi/freezegun

Or, you could say something like:
if 9 <= datetime.datetime.now().hour < 17:
self.assertContains(response, "It's working time!") 
else:
self.assertContains(response, "Happy holiday!")

That way it will at least not fail (most of the time :).

Collin

On Wednesday, March 11, 2015 at 7:43:35 AM UTC-4, Zaki Akhmad wrote:
>
> Hello, 
>
> I'd like to write a test script for my django app. 
>
> Example, if within business hour, my django app will render: 
> "It's working time!" 
>
> And if not within business hour, my django app will render: 
> "Happy holiday!" 
>
> So the views, will check when the url is accessed. 
>
> How do I write the test script? 
> Following django docs here[1], I started to write my test code. 
>
> from django.test import Client, TestCase 
>
> class TestPage(TestCase): 
> def test_holiday(self): 
> response = self.client.get('/day/') 
> self.assertEqual(response.status_code, 200) 
> self.assertContains(response, "It's working time!") 
>
> This test code will success if I run within business hour. But If I 
> run it not within business hour, the test code will fail. 
>
> * How to write a better test code? 
> * How do I use mock/patch? 
> * How to write test code that will check the within and not within 
> business hour in one file that both will success whenever I run the 
> test code? 
>
> [1]
> https://docs.djangoproject.com/en/1.7/topics/testing/tools/#testing-responses 
>
> Thanks, 
>
> -- 
> Zaki Akhmad 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3003d453-3d31-4fed-ab9a-eadd40fee8af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing django views: RequestFactory and CSRF protection

2013-07-20 Thread Vladimir Ignatev
Well, looks like I've found workaround. At first we should test if a view 
have CSRF protection: 
def test_csrf_protected(self):
request = RequestFactory().post('', data={})
response = views.register_form(request)
self.assertEqual(response.status_code, 403)

(fix me, it is very weak test for example purpose)

Then we actually test view, providing request._dont_enforce_csrf_checks = 
True. And voila. Remember that you shouldn't test Django library, so it's 
obsolete to test "CSRF bypassing + view" chain. Test your view only and 
that it is protected with @csrf_protect is absolutely enough.

четверг, 18 июля 2013 г., 11:35:00 UTC+2 пользователь Vladimir Ignatev 
написал:
>
> I need using RequestFactory instead of Client to test one of my views. So 
> the question is how to generate proper CSRF token to provide it to my 
> @csrf_protect'ed view? At this moment I get 403 error when generating POST 
> request. 
> I've read similar topic in this group dated 2011 year, but that topic 
> observed solution of the problem using Client class and it's parameter 
> enforce_csrf. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: testing django applications

2010-11-18 Thread roberto
What if you add a __init__.py inside AAA directory and in your abc/
tests.py you include "from projectXXX.AAA.xyz import class_to_test"
plus all the test code you want for testing it ?

Good luck!

Roberto

On Nov 18, 12:05 pm, girish shabadimath 
wrote:
> I will try out that ,,
>
>
>
>
>
>
>
>
>
> On Thu, Nov 18, 2010 at 6:47 PM, xvga  wrote:
> > I guess one way would  be to put xyz.py in own app. Remember though to
> > have models.py(empty is fine too) in the app dir
>
> > On Nov 18, 2:27 pm, girish shabadimath 
> > wrote:
> > > Thanks for the reply,
> > > but according to the django documentationhttp://
> > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > >  <
> >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > >test
> > > runner looks for tests only in models.py or tests.py of a specific
> > > application,,but my xyz.py is not present in any of the application.
>
> > > On Thu, Nov 18, 2010 at 4:42 PM, xvga  wrote:
> > > > Hi Girish,
>
> > > > why don't you put tests.py in the same dir where xyz.py is?
>
> > > > On Nov 18, 11:52 am, girish shabadimath 
> > > > wrote:
> > > > > Hi all,
>
> > > > > im working on a django project XXX,
>
> > > > > the directory structure is as follows:
>
> > > > > - project XXX
> > > > >       -abc
> > > > >          models.py
> > > > >          views.py
> > > > >          tests.py
> > > > >          urls.py
> > > > >      +docs
> > > > >      +libs
> > > > >      +logs
> > > > >      +thirdparty
> > > > >      +corns
> > > > >       - AAA
> > > > >          xyz.py
> > > > >          aaa.py
> > > > >      settings.py
> > > > >      urls.py
>
> > > > > i need to write tests for xyz.py,  as i understood by readinghttp://
> > > > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > > > >  <
> > > >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
>
> > > > > ,tests
> > > > > need to be present in any one application directory (here its abc ),
> > but
> > > > > xyz.py is not related to abc application so i cant
> > > > > write tests for xyz.py in abc application. Where actually i should be
> > > > > writing tests in this case?,,is there any other way?
>
> > > > > --
> > > > > Girish M S
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Django users" group.
> > > > To post to this group, send email to django-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > django-users+unsubscr...@googlegroups.com > > >  groups.com>
> >  > ooglegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/django-users?hl=en.
>
> > > --
> > > Girish M S
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Girish M S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: testing django applications

2010-11-18 Thread girish shabadimath
I will try out that ,,

On Thu, Nov 18, 2010 at 6:47 PM, xvga  wrote:

> I guess one way would  be to put xyz.py in own app. Remember though to
> have models.py(empty is fine too) in the app dir
>
> On Nov 18, 2:27 pm, girish shabadimath 
> wrote:
> > Thanks for the reply,
> > but according to the django documentationhttp://
> docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >  <
> http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >test
> > runner looks for tests only in models.py or tests.py of a specific
> > application,,but my xyz.py is not present in any of the application.
> >
> >
> >
> > On Thu, Nov 18, 2010 at 4:42 PM, xvga  wrote:
> > > Hi Girish,
> >
> > > why don't you put tests.py in the same dir where xyz.py is?
> >
> > > On Nov 18, 11:52 am, girish shabadimath 
> > > wrote:
> > > > Hi all,
> >
> > > > im working on a django project XXX,
> >
> > > > the directory structure is as follows:
> >
> > > > - project XXX
> > > >   -abc
> > > >  models.py
> > > >  views.py
> > > >  tests.py
> > > >  urls.py
> > > >  +docs
> > > >  +libs
> > > >  +logs
> > > >  +thirdparty
> > > >  +corns
> > > >   - AAA
> > > >  xyz.py
> > > >  aaa.py
> > > >  settings.py
> > > >  urls.py
> >
> > > > i need to write tests for xyz.py,  as i understood by readinghttp://
> > > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > > >  <
> > >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >
> > > > ,tests
> > > > need to be present in any one application directory (here its abc ),
> but
> > > > xyz.py is not related to abc application so i cant
> > > > write tests for xyz.py in abc application. Where actually i should be
> > > > writing tests in this case?,,is there any other way?
> >
> > > > --
> > > > Girish M S
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
> >
> > --
> > Girish M S
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: testing django applications

2010-11-18 Thread xvga
I guess one way would  be to put xyz.py in own app. Remember though to
have models.py(empty is fine too) in the app dir

On Nov 18, 2:27 pm, girish shabadimath 
wrote:
> Thanks for the reply,
> but according to the django 
> documentationhttp://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
>  test
> runner looks for tests only in models.py or tests.py of a specific
> application,,but my xyz.py is not present in any of the application.
>
>
>
> On Thu, Nov 18, 2010 at 4:42 PM, xvga  wrote:
> > Hi Girish,
>
> > why don't you put tests.py in the same dir where xyz.py is?
>
> > On Nov 18, 11:52 am, girish shabadimath 
> > wrote:
> > > Hi all,
>
> > > im working on a django project XXX,
>
> > > the directory structure is as follows:
>
> > > - project XXX
> > >       -abc
> > >          models.py
> > >          views.py
> > >          tests.py
> > >          urls.py
> > >      +docs
> > >      +libs
> > >      +logs
> > >      +thirdparty
> > >      +corns
> > >       - AAA
> > >          xyz.py
> > >          aaa.py
> > >      settings.py
> > >      urls.py
>
> > > i need to write tests for xyz.py,  as i understood by readinghttp://
> > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > >  <
> >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests>
> > > ,tests
> > > need to be present in any one application directory (here its abc ), but
> > > xyz.py is not related to abc application so i cant
> > > write tests for xyz.py in abc application. Where actually i should be
> > > writing tests in this case?,,is there any other way?
>
> > > --
> > > Girish M S
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Girish M S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: testing django applications

2010-11-18 Thread girish shabadimath
Thanks for the reply,
but according to the django documentation
http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
 test
runner looks for tests only in models.py or tests.py of a specific
application,,but my xyz.py is not present in any of the application.

On Thu, Nov 18, 2010 at 4:42 PM, xvga  wrote:

> Hi Girish,
>
> why don't you put tests.py in the same dir where xyz.py is?
>
>
> On Nov 18, 11:52 am, girish shabadimath 
> wrote:
> > Hi all,
> >
> > im working on a django project XXX,
> >
> > the directory structure is as follows:
> >
> > - project XXX
> >   -abc
> >  models.py
> >  views.py
> >  tests.py
> >  urls.py
> >  +docs
> >  +libs
> >  +logs
> >  +thirdparty
> >  +corns
> >   - AAA
> >  xyz.py
> >  aaa.py
> >  settings.py
> >  urls.py
> >
> > i need to write tests for xyz.py,  as i understood by readinghttp://
> docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >  <
> http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests>
> > ,tests
> > need to be present in any one application directory (here its abc ), but
> > xyz.py is not related to abc application so i cant
> > write tests for xyz.py in abc application. Where actually i should be
> > writing tests in this case?,,is there any other way?
> >
> > --
> > Girish M S
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: testing django applications

2010-11-18 Thread xvga
Hi Girish,

why don't you put tests.py in the same dir where xyz.py is?


On Nov 18, 11:52 am, girish shabadimath 
wrote:
> Hi all,
>
> im working on a django project XXX,
>
> the directory structure is as follows:
>
> - project XXX
>       -abc
>          models.py
>          views.py
>          tests.py
>          urls.py
>      +docs
>      +libs
>      +logs
>      +thirdparty
>      +corns
>       - AAA
>          xyz.py
>          aaa.py
>      settings.py
>      urls.py
>
> i need to write tests for xyz.py,  as i understood by 
> readinghttp://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
>  
> ,tests
> need to be present in any one application directory (here its abc ), but
> xyz.py is not related to abc application so i cant
> write tests for xyz.py in abc application. Where actually i should be
> writing tests in this case?,,is there any other way?
>
> --
> Girish M S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Testing Django applications

2009-12-15 Thread Jonas Obrist
HB wrote:
> Hey,
> Grails framework offers a huge set of tools to facilitate testing
> (unit and integration)
> I heard the same thing is true for Rails
> Does Django offers the same thing?
> Thanks.
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>
>   
Python comes with several ways of doing unit testing, read the django 
docs on this topic: 
http://docs.djangoproject.com/en/1.1/topics/testing/#topics-testing

Also the development server in Django is a brilliant way to test your 
app without having to set up a full blown apache.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Testing Django and HTTP Request

2009-02-09 Thread Vitaly Babiy
Hey Alex I got cherrypy to work great I am going to post a blog as soon as
my blog is done :)
If anyone cares just ask here and I will post a write up here.

Vitaly Babiy


On Mon, Feb 9, 2009 at 7:52 AM, Vitaly Babiy  wrote:

> Thank you Alex for you help I will look in to this.
>
> Vitaly Babiy
>
>
>
> On Mon, Feb 9, 2009 at 12:32 AM, Alex Gaynor wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:28 AM, Vitaly Babiy  wrote:
>>
>>> Yeah, it does. I am going to have to look to see if can find a better
>>> stand alone server to do this instead of patching django.
>>>
>>> Vitaly Babiy
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:22 AM, Alex Gaynor wrote:
>>>


 On Mon, Feb 9, 2009 at 12:18 AM, Vitaly Babiy wrote:

> Yea, but I see a few problems whit that solution:
>
>- Hacky
>- Still not guaranteed to work( it could take more time)
>- Would really slow down the tests
>
> Vitaly Babiy
>
>
> On Mon, Feb 9, 2009 at 12:15 AM, Alex Gaynor wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy wrote:
>>
>>> Right the problem is if I reload the server on ever test, there is
>>> not enough time for the thread to kill the server. So when the next 
>>> setUp
>>> comes 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 server what to return on the request.
>>>
>>> Vitaly Babiy
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor 
>>> wrote:
>>>


 On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy 
 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. I don't want to make the actual request 
> during
> the test, because for one if I am off-line all those tests will fail.
>
> I have tried to implement a HTTPServer in python. The problem I am
> having is once I have it thread, If I put it in the setUp method  and
> tearDown I get port in use exception. Due to the nature of the thread 
> it is
> not guaranteed to be killed in time.
>
> Vitaly Babiy
>
>
>
 You should be able to save the thread on the Test object during
 setup() and then kill it on teardown() shouldn't you?

 Alex

 --
 "I disapprove of what you say, but I will defend to the death your
 right to say it." --Voltaire
 "The people's good is the highest law."--Cicero



>>>
>>>
>>>
>> What if you just put a time.sleep(2) at the end of tearDown() that
>> should give the thread enough time to close before the next test starts.
>>
>>
>> Alex
>>
>> --
>> "I disapprove of what you say, but I will defend to the death your
>> right to say it." --Voltaire
>> "The people's good is the highest law."--Cicero
>>
>>
>>
>
>
>
 Is what you are ultimately searching for similar to this:
 http://code.djangoproject.com/ticket/2879


 Alex

 --
 "I disapprove of what you say, but I will defend to the death your right
 to say it." --Voltaire
 "The people's good is the highest law."--Cicero



>>>
>>>
>>>
>> The CherryPy WSGI server is usually a good choice for these things.
>>
>>
>> Alex
>>
>> --
>> "I disapprove of what you say, but I will defend to the death your right
>> to say it." --Voltaire
>> "The people's good is the highest law."--Cicero
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-09 Thread Vitaly Babiy
Thank you Alex for you help I will look in to this.

Vitaly Babiy


On Mon, Feb 9, 2009 at 12:32 AM, Alex Gaynor  wrote:

>
>
> On Mon, Feb 9, 2009 at 12:28 AM, Vitaly Babiy  wrote:
>
>> Yeah, it does. I am going to have to look to see if can find a better
>> stand alone server to do this instead of patching django.
>>
>> Vitaly Babiy
>>
>>
>> On Mon, Feb 9, 2009 at 12:22 AM, Alex Gaynor wrote:
>>
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:18 AM, Vitaly Babiy wrote:
>>>
 Yea, but I see a few problems whit that solution:

- Hacky
- Still not guaranteed to work( it could take more time)
- Would really slow down the tests

 Vitaly Babiy


 On Mon, Feb 9, 2009 at 12:15 AM, Alex Gaynor wrote:

>
>
> On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy wrote:
>
>> Right the problem is if I reload the server on ever test, there is not
>> enough time for the thread to kill the server. So when the next setUp 
>> comes
>> 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 server what to return on the request.
>>
>> Vitaly Babiy
>>
>>
>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor 
>> wrote:
>>
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy 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. I don't want to make the actual request 
 during
 the test, because for one if I am off-line all those tests will fail.

 I have tried to implement a HTTPServer in python. The problem I am
 having is once I have it thread, If I put it in the setUp method  and
 tearDown I get port in use exception. Due to the nature of the thread 
 it is
 not guaranteed to be killed in time.

 Vitaly Babiy



>>> You should be able to save the thread on the Test object during
>>> setup() and then kill it on teardown() shouldn't you?
>>>
>>> Alex
>>>
>>> --
>>> "I disapprove of what you say, but I will defend to the death your
>>> right to say it." --Voltaire
>>> "The people's good is the highest law."--Cicero
>>>
>>>
>>>
>>
>>
>>
> What if you just put a time.sleep(2) at the end of tearDown() that
> should give the thread enough time to close before the next test starts.
>
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your
> right to say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
>
>



>>> Is what you are ultimately searching for similar to this:
>>> http://code.djangoproject.com/ticket/2879
>>>
>>>
>>> Alex
>>>
>>> --
>>> "I disapprove of what you say, but I will defend to the death your right
>>> to say it." --Voltaire
>>> "The people's good is the highest law."--Cicero
>>>
>>>
>>>
>>
>>
>>
> The CherryPy WSGI server is usually a good choice for these things.
>
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:28 AM, Vitaly Babiy  wrote:

> Yeah, it does. I am going to have to look to see if can find a better stand
> alone server to do this instead of patching django.
>
> Vitaly Babiy
>
>
> On Mon, Feb 9, 2009 at 12:22 AM, Alex Gaynor wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:18 AM, Vitaly Babiy  wrote:
>>
>>> Yea, but I see a few problems whit that solution:
>>>
>>>- Hacky
>>>- Still not guaranteed to work( it could take more time)
>>>- Would really slow down the tests
>>>
>>> Vitaly Babiy
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:15 AM, Alex Gaynor wrote:
>>>


 On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy wrote:

> Right the problem is if I reload the server on ever test, there is not
> enough time for the thread to kill the server. So when the next setUp 
> comes
> 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 server what to return on the request.
>
> Vitaly Babiy
>
>
> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy 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. I don't want to make the actual request 
>>> during
>>> the test, because for one if I am off-line all those tests will fail.
>>>
>>> I have tried to implement a HTTPServer in python. The problem I am
>>> having is once I have it thread, If I put it in the setUp method  and
>>> tearDown I get port in use exception. Due to the nature of the thread 
>>> it is
>>> not guaranteed to be killed in time.
>>>
>>> Vitaly Babiy
>>>
>>>
>>>
>> You should be able to save the thread on the Test object during
>> setup() and then kill it on teardown() shouldn't you?
>>
>> Alex
>>
>> --
>> "I disapprove of what you say, but I will defend to the death your
>> right to say it." --Voltaire
>> "The people's good is the highest law."--Cicero
>>
>>
>>
>
>
>
 What if you just put a time.sleep(2) at the end of tearDown() that
 should give the thread enough time to close before the next test starts.


 Alex

 --
 "I disapprove of what you say, but I will defend to the death your right
 to say it." --Voltaire
 "The people's good is the highest law."--Cicero



>>>
>>>
>>>
>> Is what you are ultimately searching for similar to this:
>> http://code.djangoproject.com/ticket/2879
>>
>>
>> Alex
>>
>> --
>> "I disapprove of what you say, but I will defend to the death your right
>> to say it." --Voltaire
>> "The people's good is the highest law."--Cicero
>>
>>
>>
>
> >
>
The CherryPy WSGI server is usually a good choice for these things.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
Yeah, it does. I am going to have to look to see if can find a better stand
alone server to do this instead of patching django.

Vitaly Babiy


On Mon, Feb 9, 2009 at 12:22 AM, Alex Gaynor  wrote:

>
>
> On Mon, Feb 9, 2009 at 12:18 AM, Vitaly Babiy  wrote:
>
>> Yea, but I see a few problems whit that solution:
>>
>>- Hacky
>>- Still not guaranteed to work( it could take more time)
>>- Would really slow down the tests
>>
>> Vitaly Babiy
>>
>>
>> On Mon, Feb 9, 2009 at 12:15 AM, Alex Gaynor wrote:
>>
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy wrote:
>>>
 Right the problem is if I reload the server on ever test, there is not
 enough time for the thread to kill the server. So when the next setUp comes
 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 server what to return on the request.

 Vitaly Babiy


 On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor wrote:

>
>
> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy 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. I don't want to make the actual request during
>> the test, because for one if I am off-line all those tests will fail.
>>
>> I have tried to implement a HTTPServer in python. The problem I am
>> having is once I have it thread, If I put it in the setUp method  and
>> tearDown I get port in use exception. Due to the nature of the thread it 
>> is
>> not guaranteed to be killed in time.
>>
>> Vitaly Babiy
>>
>>
>>
> You should be able to save the thread on the Test object during setup()
> and then kill it on teardown() shouldn't you?
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your
> right to say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
>
>



>>> What if you just put a time.sleep(2) at the end of tearDown() that should
>>> give the thread enough time to close before the next test starts.
>>>
>>>
>>> Alex
>>>
>>> --
>>> "I disapprove of what you say, but I will defend to the death your right
>>> to say it." --Voltaire
>>> "The people's good is the highest law."--Cicero
>>>
>>>
>>>
>>
>>
>>
> Is what you are ultimately searching for similar to this:
> http://code.djangoproject.com/ticket/2879
>
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:18 AM, Vitaly Babiy  wrote:

> Yea, but I see a few problems whit that solution:
>
>- Hacky
>- Still not guaranteed to work( it could take more time)
>- Would really slow down the tests
>
> Vitaly Babiy
>
>
> On Mon, Feb 9, 2009 at 12:15 AM, Alex Gaynor wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy  wrote:
>>
>>> Right the problem is if I reload the server on ever test, there is not
>>> enough time for the thread to kill the server. So when the next setUp comes
>>> 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 server what to return on the request.
>>>
>>> Vitaly Babiy
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor wrote:
>>>


 On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy 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. I don't want to make the actual request during
> the test, because for one if I am off-line all those tests will fail.
>
> I have tried to implement a HTTPServer in python. The problem I am
> having is once I have it thread, If I put it in the setUp method  and
> tearDown I get port in use exception. Due to the nature of the thread it 
> is
> not guaranteed to be killed in time.
>
> Vitaly Babiy
>
>
>
 You should be able to save the thread on the Test object during setup()
 and then kill it on teardown() shouldn't you?

 Alex

 --
 "I disapprove of what you say, but I will defend to the death your right
 to say it." --Voltaire
 "The people's good is the highest law."--Cicero



>>>
>>>
>>>
>> What if you just put a time.sleep(2) at the end of tearDown() that should
>> give the thread enough time to close before the next test starts.
>>
>>
>> Alex
>>
>> --
>> "I disapprove of what you say, but I will defend to the death your right
>> to say it." --Voltaire
>> "The people's good is the highest law."--Cicero
>>
>>
>>
>
> >
>
Is what you are ultimately searching for similar to this:
http://code.djangoproject.com/ticket/2879

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
Yea, but I see a few problems whit that solution:

   - Hacky
   - Still not guaranteed to work( it could take more time)
   - Would really slow down the tests

Vitaly Babiy


On Mon, Feb 9, 2009 at 12:15 AM, Alex Gaynor  wrote:

>
>
> On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy  wrote:
>
>> Right the problem is if I reload the server on ever test, there is not
>> enough time for the thread to kill the server. So when the next setUp comes
>> 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 server what to return on the request.
>>
>> Vitaly Babiy
>>
>>
>> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor wrote:
>>
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy 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. I don't want to make the actual request during
 the test, because for one if I am off-line all those tests will fail.

 I have tried to implement a HTTPServer in python. The problem I am
 having is once I have it thread, If I put it in the setUp method  and
 tearDown I get port in use exception. Due to the nature of the thread it is
 not guaranteed to be killed in time.

 Vitaly Babiy



>>> You should be able to save the thread on the Test object during setup()
>>> and then kill it on teardown() shouldn't you?
>>>
>>> Alex
>>>
>>> --
>>> "I disapprove of what you say, but I will defend to the death your right
>>> to say it." --Voltaire
>>> "The people's good is the highest law."--Cicero
>>>
>>>
>>>
>>
>>
>>
> What if you just put a time.sleep(2) at the end of tearDown() that should
> give the thread enough time to close before the next test starts.
>
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:13 AM, Vitaly Babiy  wrote:

> Right the problem is if I reload the server on ever test, there is not
> enough time for the thread to kill the server. So when the next setUp comes
> 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
> server what to return on the request.
>
> Vitaly Babiy
>
>
> On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor wrote:
>
>>
>>
>> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy  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. I don't want to make the actual request during the
>>> test, because for one if I am off-line all those tests will fail.
>>>
>>> I have tried to implement a HTTPServer in python. The problem I am having
>>> is once I have it thread, If I put it in the setUp method  and tearDown I
>>> get port in use exception. Due to the nature of the thread it is not
>>> guaranteed to be killed in time.
>>>
>>> Vitaly Babiy
>>>
>>>
>>>
>> You should be able to save the thread on the Test object during setup()
>> and then kill it on teardown() shouldn't you?
>>
>> Alex
>>
>> --
>> "I disapprove of what you say, but I will defend to the death your right
>> to say it." --Voltaire
>> "The people's good is the highest law."--Cicero
>>
>>
>>
>
> >
>
What if you just put a time.sleep(2) at the end of tearDown() that should
give the thread enough time to close before the next test starts.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Vitaly Babiy
Right the problem is if I reload the server on ever test, there is not
enough time for the thread to kill the server. So when the next setUp comes
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
server what to return on the request.

Vitaly Babiy


On Mon, Feb 9, 2009 at 12:08 AM, Alex Gaynor  wrote:

>
>
> On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy  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. I don't want to make the actual request during the
>> test, because for one if I am off-line all those tests will fail.
>>
>> I have tried to implement a HTTPServer in python. The problem I am having
>> is once I have it thread, If I put it in the setUp method  and tearDown I
>> get port in use exception. Due to the nature of the thread it is not
>> guaranteed to be killed in time.
>>
>> Vitaly Babiy
>>
>>
>>
> You should be able to save the thread on the Test object during setup() and
> then kill it on teardown() shouldn't you?
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Testing Django and HTTP Request

2009-02-08 Thread Alex Gaynor
On Mon, Feb 9, 2009 at 12:06 AM, Vitaly Babiy  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. I don't want to make the actual request during the
> test, because for one if I am off-line all those tests will fail.
>
> I have tried to implement a HTTPServer in python. The problem I am having
> is once I have it thread, If I put it in the setUp method  and tearDown I
> get port in use exception. Due to the nature of the thread it is not
> guaranteed to be killed in time.
>
> Vitaly Babiy
>
> >
>
You should be able to save the thread on the Test object during setup() and
then kill it on teardown() shouldn't you?

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



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 Django development.
> Look in the python sub-directory of the selenium-rc distribution, and
> modify the test_google.py script so that it goes to your Django site.
>
> It might be easier if you run the Selenium RC server on a different
> box than your Django server, because SelRC uses a proxy to get around
> the Javascript security issues. The proxy might interfere with your
> Django server running on port 8000.
>
> Grig

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



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 script so that it goes to your Django site.

It might be easier if you run the Selenium RC server on a different
box than your Django server, because SelRC uses a proxy to get around
the Javascript security issues. The proxy might interfere with your
Django server running on port 8000.

Grig

On Mar 8, 11:46 am, "Paul Childs" <[EMAIL PROTECTED]> wrote:
> I have Selenium RC running and I was wondering if someone might be
> able to nudge me in the right direction. I am trying to at least get
> my local web site, running on the Django dev server, to display in the
> browser without an error, nothing more. Any help would be appreciated.
>
> The following are the steps that I took while following along with the
> Selenium tutorial.http://www.openqa.org/selenium-rc/tutorial.html
>
> I launch Selenium in the interactive mode
>
> I open my website
> cmd=getNewBrowserSession&1=*iexplore&2=http://127.0.0.1:8000
> ---> 
> Requestinghttp://localhost:/selenium-server/driver?cmd=getNewBrowserSession...http://127.0.0.1:8000
> queryString = cmd=getNewBrowserSession&1=*iexplore&2=http://
> 127.0.0.1:8000
> Modifying registry settings...
> Launching Internet Explorer...
> Got result: OK,1173381355673
>
> I try to open the home page
> cmd=open&1=http://127.0.0.1:8000/idms/=1173381355673
> ---> 
> Requestinghttp://localhost:/selenium-server/driver?cmd=open&1=http://127.0
> sessionId=1173381355673
> queryString = cmd=open&1=http://127.0.0.1:8000/idms/
> =1173381355673
> Got result: OK
>
> Then I get this Django Error message in the browser...
>
> TypeError athttp://127.0.0.1:8000/idms/
> unpack non-sequence
> Request Method: GET
> Request URL:http://127.0.0.1:8000http://127.0.0.1:8000/idms/  <
> THIS IS INTERESTING
> Exception Type: TypeError
> Exception Value: unpack non-sequence
> Exception Location: C:\Python24\lib\site-packages\django\core\handlers
> \base.py in get_response, line 68
>
> Traceback (most recent call last):
> File "C:\Python24\lib\site-packages\django\core\handlers\base.py" in
> get_response
>   68. callback, callback_args, callback_kwargs =
> resolver.resolve(request.path)
>
>   TypeError athttp://127.0.0.1:8000/idms/
>   unpack non-sequence
>
> I tried the following and still got the same error as above..
> cmd=open&1=/idms/=1173381355673
> ---> 
> Requestinghttp://localhost:/selenium-server/driver?cmd=open&1=/idms/...
> 73
> queryString = cmd=open&1=/idms/=1173381355673
> Got result: OK


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-09 Thread Paul Childs

Thanks Jeremy.

> I think, since the idms pattern is not being handled by an include,
> you may want this:
> (r'^idms/$',"idms.general.views.idms" ),
> (note the "$" at the end of the pattern).

I made the change and tried again but it didn't make a difference.

Cheers,
/Paul


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-09 Thread Jeremy Dunck

On 3/9/07, Paul Childs <[EMAIL PROTECTED]> wrote:
...
> (r'^ssi/', include('idms.ssi.urls')),
>
> (r'^idms/',"idms.general.views.idms" ),
>

I think, since the idms pattern is not being handled by an include,
you may want this:
(r'^idms/$',"idms.general.views.idms" ),
(note the "$" at the end of the pattern).

I can't explain why Selenium is requesting http://...http:// of
course.  Perhaps a redirect gone nuts somewhere...

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-09 Thread Malcolm Tredinnick

On Fri, 2007-03-09 at 13:57 +, Paul Childs wrote:
> Thanks again Malcolm.
> 
> It looks like this is starting to get beyond my comfort level. Given
> that and my time constraints, it looks like Selenium is a non-starter.
> I guess I'll just have to rely on humans to do that part of the
> testing. The Selenium IDE worked fine but unfortunately it's not
> possible to record results.


Well, don't give up just because I cannot solve your problem. I'm pretty
stupid and there are no doubt people on this list who have used Selenium
more than I have (read "at least three times"). So maybe it's an obvious
thing.

Sorry I couldn't help more.

Regards,
Malcolm




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-09 Thread Paul Childs

Thanks again Malcolm.

It looks like this is starting to get beyond my comfort level. Given
that and my time constraints, it looks like Selenium is a non-starter.
I guess I'll just have to rely on humans to do that part of the
testing. The Selenium IDE worked fine but unfortunately it's not
possible to record results.

Cheers,
/Paul

On Mar 9, 9:06 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-03-09 at 12:59 +, Paul Childs wrote:
> > Thanks for the response Malcom...
>
> > > Does the same URL work if you aren't using Selenium? I'm trying to trim
> > > down the problem to something smaller.
> > When I typehttp://127.0.0.1:8000/idms/into the address bar I do not
> > get a Django error and the proper page is rendered.
>
> Then, unfortunately, I have no idea what the problem is, because it's
> something introduced by the Selenium process. I'm not a big Selenium
> user, so unsure of what it's doing.
>
> Sounds like you need some way of seeing the URL(s) that Selenium is
> requesting from your server so that you can isolate the one that is
> causing problems.
>
> At a very low-level, you might be able to do this using tcpdump or
> ethereal or something like that (ethereal/wireshark, even better) -- if
> Selenium is talking to the browser over the local network -- and
> extracting all the HTTP-type packets to look at the requests. There's
> probably an easier way, though, since somebody must have to debug the
> Selenium interactions at some point.
>
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-09 Thread Malcolm Tredinnick

On Fri, 2007-03-09 at 12:59 +, Paul Childs wrote:
> Thanks for the response Malcom...
> 
> > Does the same URL work if you aren't using Selenium? I'm trying to trim
> > down the problem to something smaller.
> When I type http://127.0.0.1:8000/idms/ into the address bar I do not
> get a Django error and the proper page is rendered.

Then, unfortunately, I have no idea what the problem is, because it's
something introduced by the Selenium process. I'm not a big Selenium
user, so unsure of what it's doing.

Sounds like you need some way of seeing the URL(s) that Selenium is
requesting from your server so that you can isolate the one that is
causing problems.

At a very low-level, you might be able to do this using tcpdump or
ethereal or something like that (ethereal/wireshark, even better) -- if
Selenium is talking to the browser over the local network -- and
extracting all the HTTP-type packets to look at the requests. There's
probably an easier way, though, since somebody must have to debug the
Selenium interactions at some point.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-09 Thread Paul Childs

Thanks for the response Malcom...

> Does the same URL work if you aren't using Selenium? I'm trying to trim
> down the problem to something smaller.
When I type http://127.0.0.1:8000/idms/ into the address bar I do not
get a Django error and the proper page is rendered.

> I *suspect* there is a problem in your URL configuration and you have
> made a typo there. But that would mean that the URL would not work even
> if you accessed it directly in the browser, without being under
> Selenium's control, too.

Here is my URL config...
#--
from django.conf.urls.defaults import *

urlpatterns = patterns('',
(r'^doc/', include('idms.doc.urls')),
(r'^ipl/', include('idms.ipl.urls')),
(r'^ssi/', include('idms.ssi.urls')),

(r'^idms/',"idms.general.views.idms" ),

(r'^admin/', include('django.contrib.admin.urls')),
(r'^media/(.*)$', 'django.views.static.serve', {'document_root':
'C:\\idms_project\\idms\\media\\'}),

# authentication
(r'^logout/$', 'django.contrib.auth.views.logout'),
(r'^$', 'django.contrib.auth.views.login'),
(r'^login/$', 'django.contrib.auth.views.login'),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
)
#--

I dug a little deeper into the Selenium RC forum and found out that
the *proper* way to access my local server should be done using the
following commands (which I had already tried among my many attempts)

cmd=getNewBrowserSession&1=*iexplore&2=http://127.0.0.1:8000
...
Got result: OK,117398765
cmd=open&1=/idms/=117398765

I still get the Django error.

In my Django admin my site's domain name is set to 127.0.0.1:8000.

I tried the tutorial, which accesses Google's search page and I had no
problems.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Testing Django App Running on Dev Server with Selenium

2007-03-08 Thread Malcolm Tredinnick

On Thu, 2007-03-08 at 19:46 +, Paul Childs wrote:
[...]
> Then I get this Django Error message in the browser...
> 
> TypeError at http://127.0.0.1:8000/idms/
> unpack non-sequence
> Request Method: GET
> Request URL: http://127.0.0.1:8000http://127.0.0.1:8000/idms/   <
> THIS IS INTERESTING
> Exception Type: TypeError
> Exception Value: unpack non-sequence
> Exception Location: C:\Python24\lib\site-packages\django\core\handlers
> \base.py in get_response, line 68
> 
> Traceback (most recent call last):
> File "C:\Python24\lib\site-packages\django\core\handlers\base.py" in
> get_response
>   68. callback, callback_args, callback_kwargs =
> resolver.resolve(request.path)

Does the same URL work if you aren't using Selenium? I'm trying to trim
down the problem to something smaller.

I *suspect* there is a problem in your URL configuration and you have
made a typo there. But that would mean that the URL would not work even
if you accessed it directly in the browser, without being under
Selenium's control, too.

If you can make it occur manually, can you post your URL configuration?
We might be able to see the problem.

Regards,
Malcolm


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---