def test_rss_generation(session, signals, job, query): session.add(job) session.commit() assert job.id > 0 feed = rss.render_feed(query=query) # Assert on some generic information that needs to be present in the feed. url = job.url(external=True) location = u"{}, {}".format(job.location.city, job.location.country_name) title = u"{} at {} in {}".format(job.title, job.company.name, location) description = job.description assert url in feed assert title in feed assert description in feed
def feed(query=None): return Response(rss.render_feed(query=query), mimetype='text/xml')