Re: django testing: widgets

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Thu, 1 Oct 2020, 6:32 pm albert, wrote: > Hi > due to the impact of corona/covid19 I am wo

Re: Django Testing

2020-04-10 Thread Jatin Agrawal
The main reason behind learning about Testing is to check if the views that we have written for, are generating the expected results or not. Suppose you are writing an APIView to get a list of something, then you should write a testcase to check whether that APIView is giving you the result tha

Re: Django Testing

2020-03-31 Thread Lunga Baliwe
Good day, I hope this ( https://docs.djangoproject.com/en/3.0/intro/tutorial05/#writing-our-first-test) can help, its part of the Django tutorials. On Tue, Mar 31, 2020 at 4:35 PM ekong, emmanuel wrote: > I’m having the same difficulty... > > On Tue, 31 Mar 2020 at 3:32 PM, Abrar Ahmad > wrote

Re: Django Testing

2020-03-31 Thread ekong, emmanuel
I’m having the same difficulty... On Tue, 31 Mar 2020 at 3:32 PM, Abrar Ahmad wrote: > Hello Sir > I have trouble in learnig Testing tutorial of Djanog Documentation. > Can any one tell me what is the main concept of learnign test and how can > we learn it in easiest way. > I am waiting for repl

Re: Django testing strategy

2012-10-10 Thread Daniele Procida
On Thu, Oct 4, 2012, Daniele Procida wrote: >I have started writing my first tests, for a project that has become >pretty large (several thousand lines of source code). >I'd appreciate any advice. Many thanks for the advice and suggestions. This is what I have produced so far:

Re: Django testing strategy

2012-10-09 Thread Lachlan Musicman
This has been a very interesting thread - out of interest, does anyone have a preference for one of factory-boy or django-dynamic-fixture and why? They look similarly up to date and useful, but I've no idea how to differentiate them. cheers L. -- ...we look at the present day through a rear-vie

Re: Django testing strategy

2012-10-05 Thread Josh Crompton
There are a couple of problems with setting up a big database and then writing integration tests. Your tests will be slow, so they won't get run. They'll also be increasingly hard to maintain. Fixtures only seem make that worse. You've already got a code base that needs maintaining, you don't w

Re: Django testing strategy

2012-10-05 Thread Dan Gentry
I've been using factory-boy as of late, and have found it to be a great way to setup each test exactly as I need it. Fixtures aren't bad either, but working with a large amount of data can make it difficult to predict the proper output for a test, and changes to this data to accommodate a new

Re: Django testing strategy

2012-10-05 Thread Amirouche
On Friday, October 5, 2012 9:56:34 AM UTC+2, Daniele Procida wrote: > > On Thu, Oct 4, 2012, Evan Brumley > > wrote: > > >django-dynamic-fixture can also help a lot in this situation: > >http://paulocheque.github.com/django-dynamic-fixture/ > > > >Certainly beats having to futz around with f

Re: Django testing strategy

2012-10-05 Thread Amirouche
On Thursday, October 4, 2012 7:49:19 PM UTC+2, Daniele Procida wrote: > > I have started writing my first tests, for a project that has become > pretty large (several thousand lines of source code). > That is too, late! ;-) > > What needs the most testing - where most of the bugs or incorre

Re: Django testing strategy

2012-10-05 Thread Amirouche
Please ignore this message I've hit «Post» by mistake I will edit my post :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/0S78LxSWkXoJ. To post to this

Re: Django testing strategy

2012-10-05 Thread Amirouche
On Thursday, October 4, 2012 7:49:19 PM UTC+2, Daniele Procida wrote: > > I have started writing my first tests, for a project that has become > pretty large (several thousand lines of source code). > That is too, late! ;-) > > What needs the most testing - where most of the bugs or incorre

Re: Django testing strategy

2012-10-05 Thread Daniele Procida
On Thu, Oct 4, 2012, Evan Brumley wrote: >django-dynamic-fixture can also help a lot in this situation: >http://paulocheque.github.com/django-dynamic-fixture/ > >Certainly beats having to futz around with fixtures. Thanks - there seem to be a lot of tools to generate test data in various ways,

Re: Django testing strategy

2012-10-04 Thread Evan Brumley
django-dynamic-fixture can also help a lot in this situation: http://paulocheque.github.com/django-dynamic-fixture/ Certainly beats having to futz around with fixtures. On Friday, October 5, 2012 3:49:19 AM UTC+10, Daniele Procida wrote: > > I have started writing my first tests, for a project t

Re: Django testing strategy

2012-10-04 Thread Thomas Orozco
You can use `fixtures` for this purpose! You can have several of them to have exactly the data you need for a test. Have a look there: https://docs.djangoproject.com/en/dev/topics/testing/#django.test.TestCase.fixtures Cheers, Thomas 2012/10/4 Daniele Procida > I have started writing my firs

Re: Django testing and unique=True

2011-12-13 Thread Karen Tracey
On Tue, Dec 13, 2011 at 8:33 AM, Acruax wrote: > Hi, > I have a problem with model testing. My test fails with error: > IntegrityError: duplicate key value violates unique constraint > "catalog_name_key" > DETAIL: Key (name)=(test_catalog1) already exists. > > I have unique=True on name

Re: django testing. random test order with some 'dependency constraints'

2011-11-28 Thread Gelonida N
Hi Russel, Thanks for your answer. On 11/28/2011 04:12 AM, Russell Keith-Magee wrote: > On Mon, Nov 28, 2011 at 9:39 AM, Gelonida N wrote: > . . . > Unit tests are supposed to be isolated. They shouldn't depend on > execution order, or have any pre-requisite other than those specified > as part

Re: django testing. random test order with some 'dependency constraints'

2011-11-27 Thread Russell Keith-Magee
On Mon, Nov 28, 2011 at 9:39 AM, Gelonida N wrote: > I'd like to create some unit tests whch should be executed in random order. > > > However some tests could benefit from results of some predecessor tests. > > Therefore they should be executed only after certain tests. Unit tests are supposed t

Re: django testing with postgres without permissions to create databases

2011-11-26 Thread Gelonida N
On 11/26/2011 01:23 AM, Gelonida N wrote: > It seems I'm not the first one who wans to run django tests with > postgressql and who doesn't have permissions to create databases. > > I found two suggestions on the web: > > One is to use sqlite for testing instead of postgres. > However I'm not real

Re: django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Gelonida N
Hi Mike, Yes this idea is simple enough. I just wondered whether there isn't a tiny risk of finding 'test' as a paramter of one of the option in some esotheric cases. For what I am doing the solution should be absolutely fine. With my habit of using ./manage.py I could even change it to if sys.

Re: django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Mike Dewhirst
There was a great solution to this posted just yesterday ... import sys if 'runserver' in sys.argv: DEBUG = True else: DEBUG = False ... which suggests if 'test' in sys.argv: do this On 24/11/2011 9:53am, Gelonida N wrote: Hi, I just started reading about django testing. Now

Re: Django testing with existing data

2011-08-29 Thread Carlos Brum
Thanks, Russ! You're perfectly rigth! I was trying to use TDD in a wrong way. Now I understand I *have* to use a new database. "dumpdata" is what I need. Thanks for your advice. On Aug 23, 8:53 pm, Russell Keith-Magee wrote: > On Tue, Aug 23, 2011 at 9:15 PM, Carlos Brum wrote: > > Hello guy

Re: Django testing with existing data

2011-08-23 Thread Russell Keith-Magee
On Tue, Aug 23, 2011 at 9:15 PM, Carlos Brum wrote: > Hello guys, > > I'm new in Django testing whith django test facilities. > > I've read "https://docs.djangoproject.com/en/1.3/topics/testing/"; but > couldn't find what i'm looking for. > > I'm trying to begin TDD development but wanna use my ol

Re: Django testing not loading certain fixtures

2010-12-23 Thread churris
Are you loading you fixtures within your test class? eg. fixtures = ['my_fixture.xml'] Make sure that also you have included in yoour settings file the following: FIXTURE_DIRS = ( os.path.join(PROJECT_PATH, '../testing/fixtures') of course with the path where you fixture is. Hope this helps O

Re: Django testing not loading certain fixtures

2010-12-23 Thread caroline
never mind...error on my side On Dec 23, 1:52 pm, caroline wrote: > I'm experiencing some problems when loading fixtures for Django > unittests. > > If I create a fixture with manage.py dumpdata, then loading of the > fixture works (except for the fact that there is an sql error, as i am > using

Re: Django testing applications: using fixtures

2009-09-07 Thread Oleg Oltar
silver:jin oleg$ python manage.py test --verbosity=2 goserver Creating test database... Processing admin.LogEntry model Creating table django_admin_log Processing auth.Permission model Creating table auth_permission Processing auth.Group model Creating table auth_group Processing auth.User model Cr

Re: Django testing applications: using fixtures

2009-09-07 Thread V
do you load several fixtures in your unittest class? from the error message, my guess would be that you have two fixtures that contain the same model's data, and the model has a unique column you can dump data for a specific app only, thus you might avoid such problems bye, V On Sep 6, 7:21 pm,

Re: Django Testing

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