mirror of https://github.com/rq/rq.git
Added test coverage for unicode keyword argument support in method signatures (#536)
This commit is contained in:
parent
f370f79819
commit
303f4ed47c
|
@ -78,6 +78,11 @@ class CallableObject(object):
|
|||
return u"I'm callable"
|
||||
|
||||
|
||||
class UnicodeStringObject(object):
|
||||
def __repr__(self):
|
||||
return u'é'.encode('utf-8')
|
||||
|
||||
|
||||
with Connection():
|
||||
@job(queue='default')
|
||||
def decorated_job(x, y):
|
||||
|
|
|
@ -399,3 +399,11 @@ class TestJob(RQTestCase):
|
|||
job.perform()
|
||||
|
||||
self.assertRaises(TypeError, queue.enqueue, fixtures.say_hello, job_id=1234)
|
||||
|
||||
def test_get_call_string_unicode(self):
|
||||
"""test call string with unicode keyword arguments"""
|
||||
queue = Queue(connection=self.testconn)
|
||||
|
||||
job = queue.enqueue(fixtures.echo, arg_with_unicode=fixtures.UnicodeStringObject())
|
||||
self.assertIsNotNone(job.get_call_string())
|
||||
job.perform()
|
Loading…
Reference in New Issue