summaryrefslogtreecommitdiff
path: root/django/contrib/formtools/tests/__init__.py
AgeCommit message (Collapse)Author
2014-11-26Fixed #23677 -- Removed contrib.formtoolsTim Graham
2013-05-10Fixed #17365, #17366, #18727 -- Switched to discovery test runner.Carl Meyer
Thanks to Preston Timmons for the bulk of the work on the patch, especially updating Django's own test suite to comply with the requirements of the new runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the patch and the discovery runner. Refs #11077, #17032, and #18670.
2013-04-02Modified formtools to work with unittest2 discovery.Preston Timmons
2012-12-29Removed the legacy form wizard.Aymeric Augustin
2012-12-08Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-09-25Fixed #19020 -- Do not depend on dict order in formtools testsClaude Paroz
Thanks metzen for the report and initial patch, and Łukasz Rekucki for an inspirational patch on his randomhash_fixes branch.
2012-08-18[py3] Fixed formtools tests.Aymeric Augustin
Python 3 adds a new pickle protocol. The tests were updated in a way that makes it easy to add another pickle protocol, should Python gain one. Thanks Thomas Pelletier for providing an initial version of this patch.
2012-08-14Reverted pickle-json replacement form_hmac calculationClaude Paroz
This reverts commit b109ff8062f4bb225181ec462d69c9dd79339567 and complement test cases. The change was too hasty, as some form values cannot be json-serialized as is.
2012-08-13[py3] Fixed contrib.formtools testsClaude Paroz
2012-08-13Replaced pickle by json in form_hmac calculationClaude Paroz
Refs #18340
2012-08-04Fixed #5524 -- Do not remove cleaned_data when a form fails validationClaude Paroz
cleaned_data is no longer deleted when form validation fails but only contains the data that did validate. Thanks to the various contributors to this patch (see ticket).
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-19Fixed test failures after commit 1a66f53. Refs #18340Claude Paroz
2012-05-19Fixed #18340 -- Fixed formtools form_hmac with Unicode inputClaude Paroz
Using cPickle, two apparently identical Unicode strings could generate different pickled results depending on previous operations on those strings.
2012-05-03Used catch_warnings instead of save/restore methods. Refs #17049.Claude Paroz
2012-05-03Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin
Thanks Ramiro for the patch.
2012-03-31Used the override_settings decorator in the tests of auth, flatpages, and ↵Aymeric Augustin
formtools. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed some more imports/warnings useless after recent removals.Claude Paroz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated and undocumented function ↵Aymeric Augustin
django.contrib.formtools.utils.security_hash(). git-svn-id: http://code.djangoproject.com/svn/django/trunk@17841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13Fixed #6644 -- Fixed django.contrib.formtools tests to be better isolated ↵Jannis Leidel
when running outside of the Django test suite. Also moved around the new wizard's templates a bit to better fit the common app layout. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01Fixed #9200 -- Added new form wizard to formtools based on class based ↵Jannis Leidel
views. Many thanks to Stephan Jäkel, ddurham and ElliottM for their work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-28Fixed #11726 - FormWizard does sanity check on step number performed before ↵Luke Plant
dynamic steps can be inserted Thanks to Eric Friesen for the report and michalm/esper256 for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Silenced a DeprecationWarning in formtools caused by testing the deprecated ↵Russell Keith-Magee
security_hash function git-svn-id: http://code.djangoproject.com/svn/django/trunk@15996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30Updated FormPreview to use form_hmac rather than the old security_hash functionLuke Plant
This ought to have been done in [14218], but although the FormPreview class was modified, and some tests were added, the crucial lines of code were not changed (the 'FormPreview.security_hash' method), and tests for the new behaviour were not added. So it is being changed now. Unlike some of the other code in that changeset, this does not need to have a compatibility fallback to cope with existing hashes, because the consequence of a failed hash is minimal - the user is re-presented with the preview stage of the form, which will then have a correct hash. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30Removed Django 1.2 compatibility fallback for form wizard hashLuke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13Corrected hash in a formtools test to match current method, not Django 1.2Luke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13Fixed some bugs with formtools tests.Luke Plant
Without these checks, it is possible for the tests to pass by virtue of asserts never being reached for some reason (very possible in this case, due to handling of security hashes). git-svn-id: http://code.djangoproject.com/svn/django/trunk@15198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13Fixed #15075 - No longer possible to alter the form_list in ↵Luke Plant
FormWizard.process_step Thanks to niels, stas for the report, and stas for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04Removed all usages of deprecated TestCase methods (self.fail*). This ↵Alex Gaynor
removed most of the Warnings emitted (with -Wall) during the test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21Few improvements to FormPreview, thanks Andy!Honza Král
This commit adds several new hooks in backwards-compatible way: * get_initial to specify initial data based on request * get_auto_id to enable different AUTO_ID values * get_context for overriding and extending default context contents git-svn-id: http://code.djangoproject.com/svn/django/trunk@14659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16Fixed #14576 - FormWizard.done() method doesn't get passed the last form in ↵Luke Plant
the list Thanks to cyberdelia for report and test, and steph for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19Fixed #14498 - Forms passed to FormWizard.process_step are not guaranteed to ↵Luke Plant
have cleaned_data Thanks to stas for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14Fixed #14445 - Use HMAC and constant-time comparison functions where needed.Luke Plant
All adhoc MAC applications have been updated to use HMAC, using SHA1 to generate unique keys for each application based on the SECRET_KEY, which is common practice for this situation. In all cases, backwards compatibility with existing hashes has been maintained, aiming to phase this out as per the normal deprecation process. In this way, under most normal circumstances the old hashes will have expired (e.g. by session expiration etc.) before they become invalid. In the case of the messages framework and the cookie backend, which was already using HMAC, there is the possibility of a backwards incompatibility if the SECRET_KEY is shorter than the default 50 bytes, but the low likelihood and low impact meant compatibility code was not worth it. All known instances where tokens/hashes were compared using simple string equality, which could potentially open timing based attacks, have also been fixed using a constant-time comparison function. There are no known practical attacks against the existing implementations, so these security improvements will not be backported. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14218 bcc190cf-cafb-0310-a4f2-bffc1f526a37