Re: [Django] #15081: When running tests you cannot use data that is inserted the /sql/model.sql

2011-01-17 Thread Django
#15081: When running tests you cannot use data that is inserted the
/sql/model.sql
+---
  Reporter:  maesjoch   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.2   
Resolution:  duplicate  |  Keywords:  custom sql
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  reopened => closed
  * resolution:  => duplicate

Comment:

 Turns out this is already caught by Django's test suite, and has been
 reported as #14661,

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15081: When running tests you cannot use data that is inserted the /sql/model.sql

2011-01-16 Thread Django
#15081: When running tests you cannot use data that is inserted the
/sql/model.sql
+---
  Reporter:  maesjoch   | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  1.2   
Resolution: |  Keywords:  custom sql
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * stage:  Unreviewed => Accepted

Comment:

 I've already accepted the ticket. There's no need to move it back for
 another review.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15081: When running tests you cannot use data that is inserted the /sql/model.sql

2011-01-16 Thread Django
#15081: When running tests you cannot use data that is inserted the
/sql/model.sql
+---
  Reporter:  maesjoch   | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  1.2   
Resolution: |  Keywords:  custom sql
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by maesjoch):

  * stage:  Accepted => Unreviewed

Comment:

 I can reproduce with 'ENGINE': 'django.db.backends.postgresql_psycopg2',
 Same app.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15081: When running tests you cannot use data that is inserted the /sql/model.sql

2011-01-14 Thread Django
#15081: When running tests you cannot use data that is inserted the
/sql/model.sql
+---
  Reporter:  maesjoch   | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  1.2   
Resolution: |  Keywords:  custom sql
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  closed => reopened
  * resolution:  worksforme =>
  * stage:  Unreviewed => Accepted

Comment:

 Following more detail on IRC: This only affects MySQL.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15081: When running tests you cannot use data that is inserted the /sql/model.sql

2011-01-14 Thread Django
#15081: When running tests you cannot use data that is inserted the
/sql/model.sql
+---
  Reporter:  maesjoch   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.2   
Resolution:  worksforme |  Keywords:  custom sql
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0
  * resolution:  => worksforme

Old description:

> Consider following case:
> #model
> class sqltest(models.Model):
>
> name = models.CharField(max_length=100, unique=True)
>
> #test
>
> from django.test import TestCase
> from testapp.app_test.models import sqltest
>
> class SimpleTest(TestCase):
> def test_basic_addition(self):
> s = sqltest.objects.get(name='test1')
> self.assertTrue(s)
>

> #in /sql/sqltest.py
> insert into app_test_sqltest (name) values ('test1');
> insert into app_test_sqltest (name) values ('test2');
> insert into app_test_sqltest (name) values ('test3');
>

> When running your tests will not find the test1 entry. This is not
> consistent with how django docs explain it (although not that much
> testing information on custom sql).
>
> Was this by design or is it an actual bug I do not know.

New description:

 Consider following case:

 #model
 {{{
 class sqltest(models.Model):

 name = models.CharField(max_length=100, unique=True)
 }}}

 #test
 {{{
 from django.test import TestCase
 from testapp.app_test.models import sqltest

 class SimpleTest(TestCase):
 def test_basic_addition(self):
 s = sqltest.objects.get(name='test1')
 self.assertTrue(s)
 }}}

 #in /sql/sqltest.py
 {{{
 insert into app_test_sqltest (name) values ('test1');
 insert into app_test_sqltest (name) values ('test2');
 insert into app_test_sqltest (name) values ('test3');
 }}}

 When running your tests will not find the test1 entry. This is not
 consistent with how django docs explain it (although not that much testing
 information on custom sql).

 Was this by design or is it an actual bug I do not know.

Comment:

 I can't reproduce this. The test described passes as expected for me under
 SQLite and Postgres.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15081: When running tests you cannot use data that is inserted the /sql/model.sql

2011-01-14 Thread Django
#15081: When running tests you cannot use data that is inserted the
/sql/model.sql
---+
 Reporter:  maesjoch   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  1.2   
 Keywords:  custom sql |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Consider following case:
 #model
 class sqltest(models.Model):

 name = models.CharField(max_length=100, unique=True)

 #test

 from django.test import TestCase
 from testapp.app_test.models import sqltest

 class SimpleTest(TestCase):
 def test_basic_addition(self):
 s = sqltest.objects.get(name='test1')
 self.assertTrue(s)


 #in /sql/sqltest.py
 insert into app_test_sqltest (name) values ('test1');
 insert into app_test_sqltest (name) values ('test2');
 insert into app_test_sqltest (name) values ('test3');


 When running your tests will not find the test1 entry. This is not
 consistent with how django docs explain it (although not that much testing
 information on custom sql).

 Was this by design or is it an actual bug I do not know.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.