Re: [Django] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2012-06-09 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+
 Reporter:  grimfandjango  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Claude Paroz ):

 In [ad47364dd324508e8332ea853da59772431398aa]:
 {{{
 #!CommitTicketReference repository=""
 revision="ad47364dd324508e8332ea853da59772431398aa"
 Reverted 905e33f, now that DatabaseFeatures does not need confirm

 Connection.features does not need to be confirmed any more, after
 commit aa42357, rendering obsolete the workaround when using
 TEST_MIRROR (Refs #16885, #17760).
 }}}

-- 
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] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2012-01-20 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+
 Reporter:  grimfandjango  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  SVN
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by aaugustin):

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


Comment:

 In [17382]:
 {{{
 #!CommitTicketReference repository="" revision="17382"
 Fixed #16885 -- Confirmed features of mirror databases when setting up
 test databases.
 }}}

-- 
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] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2012-01-08 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+
 Reporter:  grimfandjango  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  SVN
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by mvantellingen):

 * has_patch:  0 => 1


-- 
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] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2012-01-08 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+
 Reporter:  grimfandjango  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  SVN
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by mvantellingen):

 Not really sure about the unittest since there is no easy way to override
 the call_command() function call. Would be nice to get this in before 1.4.

-- 
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] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2011-11-10 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+
 Reporter:  grimfandjango  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  SVN
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by aaugustin):

 * stage:  Unreviewed => Accepted


Comment:

 When `TEST_MIRROR` is set:
 - `BaseDatabaseCreation.create_test_db` is never called for the slave,
 - `BaseDatabaseFeatures.confirm` isn't called either,
 - `connections['slave'].features.supports_transactions` isn't computed,
 hence the problem.

 I see two ways to fix this: call `confirm` for the slave, or copy the
 features from the master to the slave after the master database 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 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] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2011-10-24 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+--
 Reporter:  grimfandjango  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Testing framework  |  Version:  SVN
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by m.vantellingen@…):

 * cc: m.vantellingen@… (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


-- 
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] #16885: django.test.testcases.connections_support_transactions always returns False if TEST_MIRROR is used

2011-09-19 Thread Django
#16885: django.test.testcases.connections_support_transactions always returns 
False
if TEST_MIRROR is used
---+---
 Reporter:  grimfandjango  |  Owner:  nobody
 Type:  Bug| Status:  new
Milestone: |  Component:  Testing framework
  Version:  SVN|   Severity:  Normal
 Keywords: |   Triage Stage:  Unreviewed
Has patch:  0  |  Easy pickings:  0
UI/UX:  0  |
---+---
 If a project is set up with multiple databases, and at least one of the
 databases uses the TEST_MIRROR option,
 django.test.testcases.connections_support_transactions will always return
 False, forcing any tests inheriting from TestCase into the (substantially
 slower) TransactionTestCase mode.

 Example: take the test case:


 {{{
 class TestTest(TestCase):
 def test_connections_support_transactions(self):
 import django.test.testcases
 self.assertTrue(django.test.testcases.connections_support_transactions())
 }}}


 and the database setup:


 {{{
 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': '/tmp/foo.db',  # Or path to database
 file if using sqlite3.
 }
 }
 }}}


 Test output:


 {{{
 Creating test database for alias 'default'...
 .
 --
 Ran 1 test in 0.000s

 OK
 }}}


 Switch to:


 {{{
 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': '/tmp/foo.db',  # Or path to database
 file if using sqlite3.
 },
 'reporting': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': '/tmp/foo2.db',
 'TEST_MIRROR': 'default',
 }
 }
 }}}


 Test output:


 {{{
 FAIL: test_connections_support_transactions
 (foo.testit.tests.TestTest)
 --
 Traceback (most recent call last):
   File "/../venvs/django_svn/foo/../foo/testit/tests.py", line 15, in
 test_connections_support_transactions
 self.assertTrue(django.test.testcases.connections_support_transactions())
 AssertionError: False is not True

 }}}

 The same problem occurs with the MySQL backend if configured analogously.

 The underlying issue is that in ''conn.features.supports_transactions for
 conn in connections.all()'' in connections_support_transactions,
 ''conn.features.supports_transactions'' is ''None'' for the alias.

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