Re: Tests not passing in suite but pass individually

2015-12-10 Thread Tim Graham
I didn't see any indication in your previous posts that you were using database routers. That's why I continue to ask for a sample project - it's difficult to debug problems without seeing the entire picture. On Wednesday, December 9, 2015 at 2:33:20 PM UTC-5, learn django wrote: > > After makin

Re: Tests not passing in suite but pass individually

2015-12-09 Thread learn django
After making following change & pointing router to 'default' database test case is passing. 'default': { # 'ENGINE': 'django.db.backends.sqlite3', # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'USER': 'postg

Re: Tests not passing in suite but pass individually

2015-12-09 Thread Tim Graham
It seems a bit suspicious that you're using the same database name for ['default']['NAME'] and ['default']['TEST']['NAME'] -- is that intentional? On Tuesday, December 8, 2015 at 8:30:05 PM UTC-5, learn django wrote: > > Hi Tim, > > My test case was working with new app in new project which was >

Re: Tests not passing in suite but pass individually

2015-12-08 Thread learn django
Hi Tim, My test case was working with new app in new project which was using default database. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } So I went back to my old app and debugged a bit. If I make f

Re: Tests not passing in suite but pass individually

2015-12-02 Thread learn django
Will try to send minimal project by end of the day. Hopefully I can discover the reason during this exercise. On Wednesday, December 2, 2015 at 3:33:30 PM UTC-8, Tim Graham wrote: > > It looks correct. I'd like a minimal project I could download to reproduce > the issue. In putting that together,

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Tim Graham
It looks correct. I'd like a minimal project I could download to reproduce the issue. In putting that together, you might discover the reason for the failure. On Wednesday, December 2, 2015 at 6:29:07 PM UTC-5, learn django wrote: > > Below is the test file & logs. > No matter in which order (us

Re: Tests not passing in suite but pass individually

2015-12-02 Thread learn django
Below is the test file & logs. No matter in which order (using --reverse) I run the suite it fails. The database backend is postgres. Is that an issue ? File:- === import datetime import pdb from rest_framework import status from rest_framework.test import APIClient from django.http import HttpR

Re: Tests not passing in suite but pass individually

2015-12-02 Thread 'Tom Evans' via Django users
On Wed, Dec 2, 2015 at 4:20 PM, Siddhi Divekar wrote: > Hi Tim, > > Below is what am trying to achieve. > > class OrcaTestCase(TestCase): > > def test_customer_create_modify_delete(self): > '''Test customer object create, modify and delete operations in > DB.''' > # Create. >

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Tim Graham
How does the test fail? Please show the entire test file including imports. On Wednesday, December 2, 2015 at 11:20:27 AM UTC-5, learn django wrote: > > Hi Tim, > > Below is what am trying to achieve. > > class OrcaTestCase(TestCase): > > def test_customer_create_modify_delete(self): >

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Bill Freeman
Did you see some documentation that said that the test framework will clear the database? I'm not sure that it's reasonable to ask a test framework to do that, given the number of possible databases and interface layers, though it is conceivable that django's variation on test could take care of t

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Siddhi Divekar
Hi Ke1g, That is the last option but wanted to understand why database was not cleaned after first test. On Wednesday, December 2, 2015 at 7:56:26 AM UTC-8, ke1g wrote: > > Make test b clean up after itself, by deleting the test object. > > On Wed, Dec 2, 2015 at 9:28 AM, Tim Graham > wrote: > >>

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Siddhi Divekar
Hi Tim, Below is what am trying to achieve. class OrcaTestCase(TestCase): def test_customer_create_modify_delete(self): '''Test customer object create, modify and delete operations in DB.''' # Create. CustomerDb.objects.create(c_name='Pnc', c_role='ADFS-Admin',

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Bill Freeman
Make test b clean up after itself, by deleting the test object. On Wed, Dec 2, 2015 at 9:28 AM, Tim Graham wrote: > It will be easier to help if you can provide a sample project that > reproduces the error. > > On Wednesday, December 2, 2015 at 3:01:31 AM UTC-5, Siddhi Divekar wrote: >> >> Hi, >

Re: Tests not passing in suite but pass individually

2015-12-02 Thread Tim Graham
It will be easier to help if you can provide a sample project that reproduces the error. On Wednesday, December 2, 2015 at 3:01:31 AM UTC-5, Siddhi Divekar wrote: > > Hi, > > Am seeing that test case in suite are failing but passing when ran > individually. > I have gone through most of the thre

Tests not passing in suite but pass individually

2015-12-02 Thread Siddhi Divekar
Hi, Am seeing that test case in suite are failing but passing when ran individually. I have gone through most of the thread on the internet but did not find any solution. Below is the snip of what am trying to do. class A(TestCase): def test_a(): create an obj in db retrive obj list fr