Hi..

I am trying with following test class

~~~
class TestNotificationTasks2(TestController):
    def setUp(self):
        super(TestNotificationTasks2, self).setUp()
        self.setup_with_tools()

    @td.with_wiki
    def setup_with_tools(self):
        pass

    def test_send_usermentions_notification(self):
        c.user = M.User.by_username('test-admin')
        c.user.set_pref('mention_notifications', True)
        with mock.patch.object(M.User, 'send_user_mention_notification') as 
um_func:
            d = dict(title='foo', text='new footext')
            r = self.app.post('/wiki/foo/update', params=d)
            print r
~~~

Do you think why I am getting this 
302 Found
The resource was found at http://localhost/wiki/foo/; you should be redirected 
automatically. 

Thanks


---

** [tickets:#8323] gsoc19 - Trigger notification task per each artifact 
creation/modification and add tests**

**Status:** review
**Milestone:** unreleased
**Labels:** gsoc19 
**Created:** Mon Aug 12, 2019 04:50 PM UTC by Shalitha Suranga
**Last Updated:** Mon Aug 19, 2019 05:55 PM UTC
**Owner:** Shalitha Suranga


Add a test for the send_usermentions_notification task. Also.. 
`send_usermentions_notification` task is only called in a few places so far, 
but would be good to do in all the places where a new artifact is 
created/modified(content) (new wiki page, new ticket, new blog post, new merge 
request). Maybe a new ticket for all that together.


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.

Reply via email to