A common pattern that we use in tests is like this:
```
h.set_context('test', 'wiki', neighborhood='Projects')
```
And then can use `c.project` and `c.app` variables just like "normal" non-test
code often does. `c.app` should be the wiki.
Also since there is such small amount of data in tests by default, you can
probably do `Page.query.find(...)` and not worry about what app it is part of.
If not of that works and its not finding the project or wiki or page at all,
maybe I was wrong about what the setup_basic_test function does in that test.
You might need to make a separate test class that also has
`setup_functional_test` in its `setUp`. That might be the thing that populates
some sample data.
---
** [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 04:58 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 [email protected] 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.