Exemple #1
0
    def test_lookup_task_basket_error(self, lookup_mock, retry_mock):

        exc = BasketException(u'Error error error')
        lookup_mock.side_effect = [exc, None]
        retry_mock.side_effect = Retry
        with self.assertRaises(Retry):
            lookup_user_task(email='*****@*****.**')
        retry_mock.called_with(exc)
Exemple #2
0
    def test_lookup_task_basket_error(self, lookup_mock, retry_mock):

        exc = BasketException(u'Error error error')
        lookup_mock.side_effect = [exc, None]
        retry_mock.side_effect = Retry
        with self.assertRaises(Retry):
            lookup_user_task(email='*****@*****.**')
        retry_mock.called_with(exc)
Exemple #3
0
    def test_lookup_task_user_not_found(self, lookup_mock):

        lookup_mock.side_effect = BasketException(u'User not found')
        result = lookup_user_task(email='*****@*****.**')
        eq_(result, {})
Exemple #4
0
    def test_lookup_task_user_not_found(self, lookup_mock):

        lookup_mock.side_effect = BasketException(u'User not found')
        result = lookup_user_task(email='*****@*****.**')
        eq_(result, {})