waliwali / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Test DB creation in Django backend should respect verbosity #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The methods create_test_db and destroy_test_db of DatabaseCreation in 
ibm_db_django/django/db/backends/db2/creation.py always print messages to 
stdout, which can 
cause problems in applications which perform scripted calls to management 
commands in 
environments where doing so is either undesired or forbidden (e.g., WSGI 
restricts access to 
stdout).

To resolve this, these methods should only print messages when the "verbosity" 
argument is 1 or 
greater, per Django's documentation:

http://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-verbosity

Original issue reported on code.google.com by ubernost...@gmail.com on 20 Jun 2009 at 7:31

GoogleCodeExporter commented 9 years ago
Thanks for Reporting this. A valid point about verbosity. I would fix this and 
update 
you for the same.

Thanks and Regards
Tarun Pasrija
Open Source Application Development
IBM India Software Labs

Original comment by tarun.pa...@in.ibm.com on 1 Jul 2009 at 7:21

GoogleCodeExporter commented 9 years ago
The django test suite takes default verbosity to be 1. You can override this by 
giving argument as --verbosity=0. This works as follows:-

In django.core.management.base we have
options, args = parser.parse_args(argv[2:])

Since there are no arguments present when we say "python manage.py test" , it 
takes 
the default arguments and verbosity=1. 

Please let me know if you have any more suggestions. Thanks

Original comment by tarun.pa...@in.ibm.com on 4 Aug 2009 at 6:53

GoogleCodeExporter commented 9 years ago
Closing this issue. 

Original comment by tarun.pa...@in.ibm.com on 6 Aug 2009 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by tarun.pa...@in.ibm.com on 28 Aug 2009 at 10:15