@ -106,7 +106,7 @@ class TestDecorator(RQTestCase):
bar_job = bar . delay ( )
bar_job = bar . delay ( )
self . assertEqual ( foo_job . _dependency_ids , [ ] )
self . assertEqual ( foo_job . _dependency_ids , [ ] )
self . assertIsNone ( foo_job . _dependency_id )
self . assertIsNone ( foo_job . _dependency_id )
self . assertEqual ( foo_job . dependency , None )
self . assertEqual ( foo_job . dependency , None )
@ -143,8 +143,8 @@ class TestDecorator(RQTestCase):
self . assertIsNone ( foo_job . _dependency_id )
self . assertIsNone ( foo_job . _dependency_id )
self . assertIsNone ( bar_job . _dependency_id )
self . assertIsNone ( bar_job . _dependency_id )
self . assertEqual ( foo_job . _dependency_ids , [ ] )
self . assertEqual ( foo_job . _dependency_ids , [ ] )
self . assertEqual ( bar_job . _dependency_ids , [ ] )
self . assertEqual ( bar_job . _dependency_ids , [ ] )
self . assertEqual ( baz_job . _dependency_id , bar_job . id )
self . assertEqual ( baz_job . _dependency_id , bar_job . id )
self . assertEqual ( baz_job . dependency , bar_job )
self . assertEqual ( baz_job . dependency , bar_job )
self . assertEqual ( baz_job . dependency . id , bar_job . id )
self . assertEqual ( baz_job . dependency . id , bar_job . id )
@ -167,7 +167,6 @@ class TestDecorator(RQTestCase):
result_job = Job . fetch ( id = result . id , connection = self . testconn )
result_job = Job . fetch ( id = result . id , connection = self . testconn )
self . assertEqual ( result_job . failure_callback , print )
self . assertEqual ( result_job . failure_callback , print )
def test_decorator_accepts_on_success_function_as_argument ( self ) :
def test_decorator_accepts_on_success_function_as_argument ( self ) :
""" Ensure that passing in on_failure function to the decorator sets the
""" Ensure that passing in on_failure function to the decorator sets the
correct on_success function on the job .
correct on_success function on the job .