Re: [Django] #19977: Test database not auto-flushing

2013-03-07 Thread Django
#19977: Test database not auto-flushing
-+-
 Reporter:  anonymous|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:  test database flush  |  Unreviewed
  inconsistent   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by jacob):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Without more details of how you're running tests unfortunately we probably
 can't fix this. I understand that you can't share private info, but with
 just your description to go on it sounds like you're doing something
 rather out of the ordinary. So I'm going to close this; if you can provide
 a minimal test case that reproduces the problem please feel free to reopen
 it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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




Re: [Django] #19977: Test database not auto-flushing

2013-03-05 Thread Django
#19977: Test database not auto-flushing
-+-
 Reporter:  anonymous|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  test database flush  |  Unreviewed
  inconsistent   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by anonymous):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I managed to finally get all the tests passing together, but I did it by
 removing a fixture from the fixtures list.

 This is very strange because the test was passing when run with just its
 file, but not with all other test files.

 I think the problem is now related to Django signals, because I use them
 to automatically create some records (in the model/table in question) when
 a record in another model is created.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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




[Django] #19977: Test database not auto-flushing

2013-03-03 Thread Django
#19977: Test database not auto-flushing
-+-
 Reporter:  anonymous|  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Database layer   |Version:  1.5
  (models, ORM)  |   Keywords:  test database flush
 Severity:  Normal   |  inconsistent
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+-
 I have a bunch of unit test files, all of which consist of
 django.test.TestCase classes.

 Wrote myself a little shell script to uncomment/comment test file imports
 in my {{{__init__.py}}} file, so I can run tests from certain test files,
 based off the command line arguments I give it. I am also able to run all
 the tests of all the test files in one go (for regression testing
 purposes).

 I have this one test file that has some JSON fixtures and the first test
 checks that a certain model/table has 3 records in it (defined by the JSON
 fixture).

 So here is the problem: when I run this test file on its own its tests
 pass with flying colours, but when I run the test with all other tests,
 that particular test case I mentioned, fails.

 When I run all the tests, the database says there are 6 records in the
 table/model, but there should only be 3 (from the fixture), like when the
 test file is run by itself.

 I also tried running that test file with a few other test files (not all)
 and it passes. So the only time it doesn't, is when all the test files are
 run.

 To me this seems like a bug in Django or PostgreSQL (DB I am using),
 because aren't Django TestCases supposed to auto-flush/reset the database
 between each test method, let alone test class?

 Posted on the "Django users" group first
 (https://groups.google.com/forum/#!topic/django-users/kCeAEVn8nyw), but
 haven't got a response yet.

 I'm sorry I am not able to divulge information on how to replicate the
 problem, but it really is as simple as: run all the test files (fails),
 run single test file (passes).

 I was originally using Django 1.4.3, then upgraded to 1.5 (hoping it would
 fix the problem), but it is still there.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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