On Wed, 2007-10-31 at 20:35 +, mamcxyz wrote:
> I don't call count manually.
>
> I'm doing:
>
> self.assertContains(self.response,u'Fallo el ingreso. Revise su clave
> y usuario')
>
> assertContains is part of Django Test framework. ie:
>
> def assertContains(self, response, text, coun
I don't call count manually.
I'm doing:
self.assertContains(self.response,u'Fallo el ingreso. Revise su clave
y usuario')
assertContains is part of Django Test framework. ie:
def assertContains(self, response, text, count=None,
status_code=200):
"""
Asserts that a response
On Tue, 2007-10-30 at 21:02 +, mamcxyz wrote:
> I run this script and still get the errors. I think the problem is
> elsewhere but how know?
You've failed to look at my initial response to this: calling count() on
a Unicode string with UTF-8 as the argument to count() won't work.
Re-read all
I run this script and still get the errors. I think the problem is
elsewhere but how know?
import codecs
import os
DIR = r"F:\Proyectos\Python\jhonWeb\shared\core\templates\core"
arc=os.listdir(DIR)
def write(file,text):
# Open a UTF-8 file in read mode
infile = codecs.open(file, "w",
I use ultra-edit to change all files to utf8 and still get the same
problem.
About the questions:
* The database is sqlite, created by the test runner
* The type of text is unicode (u'http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---
On Sat, 2007-10-27 at 10:59 +1000, Malcolm Tredinnick wrote:
[...]
> I guess you know what you mean here, Jeremy, but just in case anybody
> hits this in the archives: DEFAULT_CHARSET has nothing to do with the
> internal bytestrings you pass to Django. It *only* affects the output
> from the emai
On Fri, 2007-10-26 at 12:30 -0700, mamcxyz wrote:
> I'm in the process to relaunch a django site. I build a dozen test
> (finally!) for it and work correctly before.
>
> I update django to changeset 6601 and get a lot of errors. I fix
> almost all of them except this:
>
> self.assertContains
On Fri, 2007-10-26 at 15:52 -0500, Jeremy Dunck wrote:
> On 10/26/07, mamcxyz <[EMAIL PROTECTED]> wrote:
> >
> > > What's the type and value of "request.content"? What's the type and
> > > value of "text" ?
> >
> > self.response=
>
> Err, please give the type and value of request.*content*, not
On 10/26/07, mamcxyz <[EMAIL PROTECTED]> wrote:
>
> > What's the type and value of "request.content"? What's the type and
> > value of "text" ?
>
> self.response=
Err, please give the type and value of request.*content*, not request. :)
...
> 'content-type': ('Content-Type', 'text/html; charse
> What's the type and value of "request.content"? What's the type and
> value of "text" ?
self.response=
Doing a self.response.__dict__ I see this relevant values:
'content-type': ('Content-Type', 'text/html; charset=utf-8')}
META:{'CONTENT_LENGTH': None,
'CONTENT_TYPE': 'text/html; charset=ut
On 10/26/07, mamcxyz <[EMAIL PROTECTED]> wrote:
>
> self.assertContains(self.response,u'Buscar:')
> File "D:\Programacion\Python\Python24\lib\site-packages\django\test
> \testcases.py", line 111, in assertContains
> real_count = response.content.count(text)
> UnicodeDecodeError: 'ascii'
I'm in the process to relaunch a django site. I build a dozen test
(finally!) for it and work correctly before.
I update django to changeset 6601 and get a lot of errors. I fix
almost all of them except this:
self.assertContains(self.response,u'Buscar:')
File "D:\Programacion\Python\Python
12 matches
Mail list logo