Alex Gaynor
ca6015ca71
Close files in the module_loading tests always.
2012-08-15 02:47:02 -07:00
Florian Apolloner
ebc1325721
[py3] Always pass bytes to hashlib.md5.
2012-08-15 11:34:41 +02:00
Alex Gaynor
52c351a151
Fixed the erorr handling code for missing management commands.
2012-08-15 02:18:11 -07:00
Alex Gaynor
fc99f127d8
Explicitly close a file during the email tests.
2012-08-15 02:16:28 -07:00
Alex Gaynor
d1d393f975
Allow tests using a LiveServer to get closer to working.
2012-08-15 02:11:55 -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
Claude Paroz
64531df5df
Sent got_request_exception signal before handle_uncaught_exception
...
In some cases (notably Python 3), when handle_uncaught_exception was
itself raising an exception, the got_request_exception was storing
the latter exception instead of the original exception.
2012-08-15 10:58:26 +02:00
Alex Gaynor
31ae103a15
Fixed syndication under python3.
2012-08-15 01:54:18 -07: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
d674bd603e
Final explicit closing for staticfiles, they now pass on python3 with -Wall and there are no warnings about unclosed files
2012-08-15 01:29:05 -07:00
Alex Gaynor
2048bbee8c
Explicitly close files in the staticfiles tests.
2012-08-15 01:25:01 -07:00
Alex Gaynor
20a7a244d7
Make sure to explicitly close opened files.
2012-08-15 01:21:40 -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
Aymeric Augustin
e091c18f50
[py3] Removed a remaining use of __metaclass__.
2012-08-14 23:45:12 +02:00
Aymeric Augustin
212a512984
[py3] Avoided the deprecated base64 interface.
...
This fixes a deprecation warning under Python 3.
2012-08-14 23:45:12 +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
Claude Paroz
34ac145796
[py3] Fixed contrib.auth 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
Aymeric Augustin
37c9318748
[py3] Fixed sitemaps tests.
2012-08-14 20:14:31 +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
9cb80356fc
[py3] Fed strftime with unicode on Python 3
2012-08-14 16:19:58 +02:00
Claude Paroz
c35501a128
[py3] Fixed HttpResponse when initialized with bytes
2012-08-14 16:15:50 +02:00
Alex Gaynor
a351e383b6
There's no need to do list(dict.keys())
list(dict)` is enough.
2012-08-14 06:57:16 -07:00
Anssi Kääriäinen
4e7f04cdad
[py3] Fixed file.read().decode(), used codecs.open() instead
2012-08-14 16:09:01 +03:00
Anssi Kääriäinen
62a9ed0ac7
[py3] Fixed F-expression division operators
...
In Python 3 dividing by int will call obj.__truediv__(). This operator
was missing from F-expressions.
2012-08-14 16:07:32 +03: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
Aymeric Augustin
0c198b85a3
[py3] Replace filter/lambda by list comprehensions
...
This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
2012-08-14 14:31:06 +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
9299dc42ed
[py3] Removed unnecessary calls to .keys()
...
when computing the length of a dictionary. This fails on Python 3.
2012-08-14 14:09:23 +02:00
Aymeric Augustin
2ae58b20ec
[py3] Fixed egg template loader.
2012-08-14 12:29:53 +02: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
Claude Paroz
d1452f6097
[py3] Favoured unicode strings in assert(Not)Contains
...
In Python 3, HTMLParser does not support bytestrings.
2012-08-14 12:19:17 +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
0df0cf70d4
Reverted pickle-json replacement form_hmac calculation
...
This reverts commit b109ff8062
and
complement test cases. The change was too hasty, as some form
values cannot be json-serialized as is.
2012-08-14 09:51:39 +02:00
Claude Paroz
363dbd920e
[py3] Fixed contrib.formtools tests
2012-08-13 21:26:12 +02:00
Claude Paroz
a025b75f6c
[py3] Fixed iterlists usage in QueryDict
2012-08-13 21:25:27 +02:00
Claude Paroz
b109ff8062
Replaced pickle by json in form_hmac calculation
...
Refs #18340
2012-08-13 21:02:18 +02:00
Claude Paroz
0dac73ebd7
Removed binary flag to open files for writing text content
2012-08-13 18:23:26 +02:00
Florian Apolloner
d2975718fe
Consistenly use _ as alias for ugettext_lazy in the i18n docs.
2012-08-13 16:54:13 +02:00
Claude Paroz
45baaabafb
[py3] Fixed encoding issues in cache key generation
2012-08-13 12:56:59 +02:00