Re: [Django] #11603: Add an assertFormSetError function to django.test.TestCase

2013-05-27 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
 Reporter:  martin_speleo|Owner:
 Type:  New feature  |  martin_speleo
Component:  Testing framework|   Status:  closed
 Severity:  Normal   |  Version:  master
 Keywords:  formset  |   Resolution:  fixed
Has patch:  1| Triage Stage:  Accepted
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"d194714c0a707773bd470bffb3d67a60e40bb787"]:
 {{{
 #!CommitTicketReference repository=""
 revision="d194714c0a707773bd470bffb3d67a60e40bb787"
 Fixed #11603 - Added django.test.SimpleTestCase.assertFormsetError

 Thank-you Martin Green for the patch.
 }}}

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.8a8d670dc7b11ea20b5d9bd53db20d70%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #11603: Add an assertFormSetError function to django.test.TestCase

2013-05-23 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
 Reporter:  martin_speleo|Owner:
 Type:  New feature  |  martin_speleo
Component:  Testing framework|   Status:  new
 Severity:  Normal   |  Version:  master
 Keywords:  formset  |   Resolution:
Has patch:  1| Triage Stage:  Accepted
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by timo):

 I've updated the pull request above to ensure the tests pass on Python 3
 and think this is RFC, but would appreciate if another core dev could take
 a quick look and +1 since my contributions have been limited to
 documentation.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.3ecd311584d4f21e354d4b91b942d847%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #11603: Add an assertFormSetError function to django.test.TestCase

2013-02-08 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
 Reporter:  martin_speleo|Owner:
 Type:  New feature  |  martin_speleo
Component:  Testing framework|   Status:  new
 Severity:  Normal   |  Version:  master
 Keywords:  formset  |   Resolution:
Has patch:  1| Triage Stage:  Accepted
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by timo):

 I've used this in a project with good success.  I've updated the patch to
 apply cleanly to trunk and submitted a pull request.

 https://github.com/django/django/pull/708

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-08-29 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by martin_speleo):

 * needs_better_patch:  1 => 0


Comment:

 I have modified the code and documentation, as suggested, to take a
 form_index parameter rather than a form parameter.

 I have resolved the failures of the test.  The issue was the default value
 of the longMessage variable (Boolean) in the unittest module.  I have now
 checked that the tests work using python 2.6 and python 2.7, with and
 without unittest2 available.  The documentation building has also been
 checked.

 For AssertFormsetError the error messages are slightly clearer with
 longMessage set to False, however I have not set this parameter in order
 to stay consistent with the other test functions eg. AssertFormError.

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-08-28 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-

Comment (by russellm):

 As requested in a private chat, here are the errors I see running against
 r16707, Python 2.6.1, under OSX Snow Leopard.
 {{{

 django)kronkite:tests rkm$ ./runtests.py --settings=sqlite test_client
 test_client_regress
 Creating test database for alias 'default'...
 Creating test database for alias 'other'...
 
.FF...F..FF..
 ==
 FAIL: test_no_nonfield_error
 (regressiontests.test_client_regress.models.AssertFormsetErrorTests)
 An assertion is raised if the formsets non-field errors doesn't contain
 any errors.
 --
 Traceback (most recent call last):
   File
 
"/Users/rkm/projects/django/hg/tests/regressiontests/test_client_regress/models.py",
 line 606, in test_no_nonfield_error
 prefix + "The formset 'my_formset', form 1 in "
 AssertionError: "True is not False : The formset 'my_formset', form 1 in
 context 0 does not contain any non-field errors." != "The formset
 'my_formset', form 1 in context 0 does not contain any non-field errors."

 ==
 FAIL: test_no_nonform_error
 (regressiontests.test_client_regress.models.AssertFormsetErrorTests)
 An assertion is raised if the formsets non-form errors doesn't contain any
 errors.
 --
 Traceback (most recent call last):
   File
 
"/Users/rkm/projects/django/hg/tests/regressiontests/test_client_regress/models.py",
 line 647, in test_no_nonform_error
 "The formset 'my_formset' in context 0 "
 AssertionError: "True is not False : The formset 'my_formset' in context 0
 does not contain any non-form errors." != "The formset 'my_formset' in
 context 0 does not contain any non-form errors."

 ==
 FAIL: test_unknown_error
 (regressiontests.test_client_regress.models.AssertFormsetErrorTests)
 An assertion is raised if the field doesn't contain the specified error
 --
 Traceback (most recent call last):
   File
 
"/Users/rkm/projects/django/hg/tests/regressiontests/test_client_regress/models.py",
 line 579, in test_unknown_error
 prefix + "The field 'email' "
 AssertionError: "False is not True : The field 'email' on formset
 'my_formset', form 0 in context 0 does not contain the error 'Some error.'
 (actual errors: [u'Enter a valid e-mail address.'])" != "The field 'email'
 on formset 'my_formset', form 0 in context 0 does not contain the error
 'Some error.' (actual errors: [u'Enter a valid e-mail address.'])"

 ==
 FAIL: test_unknown_nonfield_error
 (regressiontests.test_client_regress.models.AssertFormsetErrorTests)
 An assertion is raised if the formsets non-field errors doesn't contain
 the provided error.
 --
 Traceback (most recent call last):
   File
 
"/Users/rkm/projects/django/hg/tests/regressiontests/test_client_regress/models.py",
 line 621, in test_unknown_nonfield_error
 prefix + "The formset 'my_formset', form 0 in "
 AssertionError: "False is not True : The formset 'my_formset', form 0 in
 context 0 does not contain the non-field error 'Some error.' (actual
 errors: [u'Non-field error.'])" != "The formset 'my_formset', form 0 in
 context 0 does not contain the non-field error 'Some error.' (actual
 errors: [u'Non-field error.'])"

 ==
 FAIL: test_unknown_nonform_error
 (regressiontests.test_client_regress.models.AssertFormsetErrorTests)
 An assertion is raised if the formsets non-form errors doesn't contain the
 provided error.
 --
 Traceback (most recent call last):
   File
 

Re: [Django] #11603: Add an assertFormSetError function to django.test.TestCase

2011-08-28 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-
Changes (by martin.speleo@…):

 * cc: martin.speleo@… (added)


-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-08-28 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-

Comment (by anonymous):

 Replying to [comment:9 russellm]:
 > I just tried to apply this patch, and it failed 4 of its own tests.

 I am unable to reproduce these test failures, could you send me the errors
 that you get, and any relevant version information.

 Thanks,
 Martin

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-08-22 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-
Changes (by russellm):

 * needs_better_patch:  0 => 1
 * stage:  Ready for checkin => Accepted


Comment:

 I just tried to apply this patch, and it failed 4 of its own tests.

 On a closer examination, I'm also inclined to suggest that the ``form``
 argument should be named ``form_index``; there are other assertions that
 have a form argument that take an actual form instance, so ``form_index``
 makes it clear that you're asking for an integer, not a form.

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-06-27 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Ready for  |  Easy pickings:  0
  checkin|
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by russellm):

 * stage:  Accepted => Ready for checkin


-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-06-26 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone:  1.4|   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by martin_speleo):

 * milestone:   => 1.4


Comment:

 Documentation changed assuming that this will be added to version 1.4,
 along with a minor feature entry in the v1.4 release notes.

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-06-26 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone: |   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by martin_speleo):

 * needs_better_patch:  1 => 0
 * ui_ux:   => 0


Comment:

 I have updated the patch to include support for the optional msq_prefix
 keyword argument in trunk.  The tests now use assertRaises and the with
 statement.  The documentation states that it is a new feature in SVN, let
 me know if I need to change this to 1.4, and add to the 1.4 release notes.

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2011-04-21 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
-+-
   Reporter: |  Owner:  martin_speleo
  martin_speleo  | Status:  new
   Type:  New|  Component:  Testing framework
  feature|   Severity:  Normal
  Milestone: |   Keywords:  formset
Version:  SVN|  Has patch:  1
 Resolution: |Needs tests:  0
   Triage Stage:  Accepted   |  Easy pickings:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
-+-
Changes (by julien):

 * needs_better_patch:  0 => 1
 * easy:   => 0


Comment:

 Thanks for your patch, it looks pretty good. It would need to be updated
 to apply to trunk though. Also, the tests could be made more elegant by
 using `assertRaises` and the `with` statement
 (http://docs.python.org/library/unittest.html#unittest.TestCase.assertRaises)
 instead of all those try/except/else's. By the way, you can import the
 `with` statement in Python 2.5 by doing: `from __future__ import
 with_statement`

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2009-08-23 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
+---
  Reporter:  martin_speleo  | Owner:  martin_speleo
Status:  new| Milestone:   
 Component:  Testing framework  |   Version:  SVN  
Resolution: |  Keywords:  formset  
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by martin_speleo):

  * needs_docs:  1 => 0
  * has_patch:  0 => 1
  * version:  => SVN
  * needs_tests:  1 => 0

Comment:

 My first attempt at contibuting to Django, I think the patch should be
 ready to be checked in.

 It could possibly do with some unittesting on checking for more than one
 error at once.  assertFormError also does not have unittests for dealing
 with multiple errors, along with a few other little bits and pieces.  But
 if I understand correctly, exceptions are normally used to raise errors in
 forms/formsets so mulitple errors will be uncommon.

 I have not tested that my changes to the documentation do not break
 everything, as I am running Vista and the make file for the documentation
 used a -p command on mkdir which did not appear to be understood.  If this
 is a problem let me know and I will try to make the documenetation again.

-- 
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] #11603: Add an assertFormSetError function to django.test.TestCase

2009-08-23 Thread Django
#11603: Add an assertFormSetError function to django.test.TestCase
+---
  Reporter:  martin_speleo  | Owner:  martin_speleo
Status:  new| Milestone:   
 Component:  Testing framework  |   Version:   
Resolution: |  Keywords:  formset  
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  1  |   Needs_tests:  1
Needs_better_patch:  0  |  
+---
Changes (by martin_speleo):

 * cc: sethtr...@gmail.com (removed)
  * needs_docs:  0 => 1
  * owner:  nobody => martin_speleo
  * needs_tests:  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
-~--~~~~--~~--~--~---