I have an app that provides some custom SQL statements for populating the
test database (located in /particles/sql/particle.sql).  The app's database
table (particles_particle) is populated correctly when I run the test case
for the app (i.e. python manage.py test particles) but the database table is
not populated when I run the entire test suite (i.e. python manage.py test). 
The testing output seems to indicate that the custom SQL was loaded
('Installing custom SQL for particles.Particle model') but no records appear
in the database and a test that verifies the number of expected records
fails.

The testing output is included below.
Any ideas on why the custom SQL records are not appearing?  

- Tyler


taeri...@latituded830b:djangosite$ python manage.py test particles
createlang -d test_carbon_sql -U django_test plpgsql
psql -d test_carbon_sql -U django_test -f
"/usr/local/postgis/1.3.3/share/lwpostgis.sql"
psql -d test_carbon_sql -U django_test -f
"/usr/local/postgis/1.3.3/share/spatial_ref_sys.sql"
Creation of spatial database test_carbon_sql successful.
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table particles_particle
Installing custom SQL for particles.Particle model
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
..Number of particle records: 7
..
----------------------------------------------------------------------
Ran 4 tests in 0.075s

OK
Destroying test database...
taeri...@latituded830b:djangosite$ python manage.py test
createlang -d test_carbon_sql -U django_test plpgsql
psql -d test_carbon_sql -U django_test -f
"/usr/local/postgis/1.3.3/share/lwpostgis.sql"
psql -d test_carbon_sql -U django_test -f
"/usr/local/postgis/1.3.3/share/spatial_ref_sys.sql"
Creation of spatial database test_carbon_sql successful.
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table particles_particle
Installing custom SQL for particles.Particle model
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
...................Number of particle records: 0
F...
======================================================================
FAIL: test_kml_placemark (djangosite.particles.tests.ParticleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/terickson/current_work/kml_competition/hg/carbon/djangosite/../djangosite/particles/tests.py",
line 64, in test_kml_placemark
    self.assertEquals(Particle.objects.all().count(),7)
AssertionError: 0 != 7

----------------------------------------------------------------------
Ran 23 tests in 5.961s

FAILED (failures=1)
Destroying test database...
taeri...@latituded830b:djangosite$ 

-- 
View this message in context: 
http://www.nabble.com/Custom-SQL-not-installed-while-running-test-suite-tp21267450p21267450.html
Sent from the django-users mailing list archive at Nabble.com.


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

Reply via email to