Alex Gaynor
fc99f127d8
Explicitly close a file during the email tests.
2012-08-15 02:16:28 -07:00
Alex Gaynor
dfbcbf2124
Always close files in the file_storage tests.
2012-08-15 02:05:03 -07:00
Claude Paroz
e0d67f3440
[py3] Fixed test_client_regress tests
2012-08-15 10:58:26 +02:00
Alex Gaynor
cca01c96d1
Converted the modeladmin tests to run on python 2 and 3.
2012-08-15 01:46:31 -07:00
Alex Gaynor
54afdbf378
Fixed usage of several deprecated aliases in unittest.
2012-08-15 01:38:04 -07:00
Alex Gaynor
2048bbee8c
Explicitly close files in the staticfiles tests.
2012-08-15 01:25:01 -07:00
Alex Gaynor
c7734491f8
Use a name that exists in both python2 and 3,
2012-08-15 01:13:09 -07:00
Aymeric Augustin
e0ec7507ac
[py3] Fixed jsi18n test.
...
Also refactored said test to avoid leaking state (ie. active
translation) when an error occurs.
2012-08-15 09:45:28 +02:00
Aymeric Augustin
478a69314e
[py3] Fixed uses of __metaclass__ in tests.
2012-08-15 00:31:29 +02:00
Chris Lawlor
450c0df653
[py3] Fixed modeltests.model_forms tests.
2012-08-14 23:46:23 +02:00
Claude Paroz
928baee747
[py3] Fixed conditional_processing tests
2012-08-14 23:35:12 +02:00
Claude Paroz
0120985095
[py3] Fixed file_uploads tests
2012-08-14 23:35:12 +02:00
Florian Apolloner
367bfaa522
Don't swallow AttributeError in core.urlresolvers.get_callable.
2012-08-14 21:23:25 +02:00
Claude Paroz
f2fe7a3e36
[py3] Fixed serializers tests
2012-08-14 19:54:53 +02:00
Claude Paroz
7d48e077b5
[py3] Fixed staticfiles tests
2012-08-14 17:24:31 +02:00
Claude Paroz
c2d59e5564
[py3] Fixed admin_views tests
...
Also changed several occurrences of 'request' to 'response'.
2012-08-14 14:45:28 +02:00
Aymeric Augustin
d6b8b125fb
[py3] Fixed admin_custom_urls tests.
2012-08-14 14:38:23 +02:00
Anssi Kääriäinen
5b27e6f64b
[py3] Fixed comparison of list and range()
...
A test compared list directly against a range(). This is py3
incompatible. Fixed by using list(range()).
2012-08-14 15:28:55 +03:00
Anssi Kääriäinen
8fe03865f7
[py3] Fixed invalid use of dict.items()
...
An ordering test had two problems related to dict.items() usage:
- It assumed the order of the dict was non-randomized
- It indexed to the dict.items() which is py3 incompatible.
I fixed the test by using dict['rank'] directly, where rank is the
column tested on the values queryset.
2012-08-14 15:24:43 +03:00
Aymeric Augustin
dcf72835e3
[py3] Ensured the template tests run.
2012-08-14 12:29:53 +02:00
Aymeric Augustin
faf570df18
[py3] Compared response.content with bytes.
2012-08-14 12:29:53 +02:00
Aymeric Augustin
e04230e2e4
[py3] Ported django.http according to PEP 3333.
...
Perfomed some style cleanup while I was in the area.
2012-08-14 10:32:16 +02:00
Claude Paroz
45baaabafb
[py3] Fixed encoding issues in cache key generation
2012-08-13 12:56:59 +02:00
Claude Paroz
d774ad752d
[py3] Made csrf context processor return Unicode
2012-08-13 11:54:21 +02:00
Claude Paroz
73f0f18c8f
[py3] Fixed admin_scripts tests
2012-08-13 10:58:21 +02:00
Claude Paroz
6d68022a27
[py3] Removed filename encoding in file_uploads test
2012-08-13 09:56:14 +02:00
Andrei Antoukh
99321e30ce
Fixed #18306 -- Made deferred models issue update_fields on save
...
Deferred models now automatically update only the fields which are
loaded from the db (with .only() or .defer()). In addition, any field
set manually after the load is updated on save.
2012-08-12 22:39:27 +03:00
Anssi Kääriäinen
59a655988e
Fixed #13844 -- Avoid converting unknown db values to float
...
This patch removes an unconditional float(value) conversion from db
backend default convert_values() method. This can cause problems when
aggregating over character fields for example. In addition, Oracle
and SQLite already return the bare value from their convert_values().
In the long term the converting should be done by fields, and the
fields should then call database backend specific converters when
needed. The current setup is inflexible for 3rd party fields.
Thanks to Merlijn van Deen for the original patch.
2012-08-12 21:52:52 +03:00
Karen Tracey
49bb72c403
[py3] Made exception examination py3-compatible.
2012-08-12 12:08:58 -04:00
Aymeric Augustin
d4a0b27838
[py3] Refactored __unicode__ to __str__.
...
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
test it under Python 2
2012-08-12 14:44:40 +02:00
Aymeric Augustin
e7e08fd48b
[py3] Replaced some __str__ methods by __unicode__
...
These methods actually return unicode.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
2bb2eecb63
[py3] Removed redundant __str__ methods.
...
These classes already have an identical __unicode__ method, which
will be used after an upcoming refactoring.
2012-08-12 14:44:40 +02:00
Karen Tracey
759ae3c2da
Fixed #18739 -- witdthratio behavior on None args
...
Made behavior given None consistent with how non-numerics were handled.
Thanks to ja.geb@me.com for the report.
2012-08-11 19:24:18 -04:00
Karen Tracey
be7f1099c6
Decorated some tests that require tz support.
...
This allows the test suite to run without errors on Windows.
2012-08-11 17:32:24 -04:00
Claude Paroz
6602103338
[py3] Various minor syntax fixes in the test suite
2012-08-11 23:23:31 +02:00
Claude Paroz
3eb28d0119
[py3] Used six.StringIO to simulate stdout buffer in tests
2012-08-11 18:56:14 +02:00
Claude Paroz
97fe70d30b
[py3] Used BytesIO to test request streams
2012-08-11 11:11:20 +02:00
Claude Paroz
92b2dec918
[py3] Made signing infrastructure pass tests with Python 3
2012-08-10 18:07:46 +02:00
Claude Paroz
751774c29f
[py3] Fixed mail tests with Python 3
2012-08-09 20:13:29 +02:00
Claude Paroz
96a6912ec5
[py3] Fixed compilemessages tests
2012-08-08 23:40:20 +02:00
Alex Gaynor
0955d16a16
Switched to using the standard method for comparing querysets in teh templates.
2012-08-08 07:50:59 -07:00
Aymeric Augustin
396357741b
[py3] Used compatible imports of StringIO.
2012-08-08 14:50:01 +02:00
Alex Gaynor
46cc530fad
Fix a test that relied on an exception outliving the `except` block, which doesn't happen on py3k.
2012-08-07 07:22:25 -07:00
Aymeric Augustin
fe8484efda
[py3] Ported django.utils.functional.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
02e6b6409b
[py3] Ported django.utils.decorators.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
127b461b11
[py3] Ported django.utils.crypto.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
b55e07771f
[py3] Ported django.utils.baseconv.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Brendan MacDonell
ad237fb72f
Fixed #18724 -- Fixed IntegerField validation with value 0
2012-08-06 10:42:21 +02:00