Skip to content

Instantly share code, notes, and snippets.

@anjalymehla
Last active September 26, 2015 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjalymehla/38ced32ab9d99660cb8c to your computer and use it in GitHub Desktop.
Save anjalymehla/38ced32ab9d99660cb8c to your computer and use it in GitHub Desktop.
Test for channel links in email
test_eventemails.py
(event.channels.all.exists()):
for channel in event.channels.all():
channel_url = reverse('main:home_channels', args= (channel.slug))
_ok(channel_url in html_body)
Output :
(lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'home_channels' with arguments '(u'm', u'a', u'i', u'n')' and keyword arguments '{}' not found. 2 pattern(s) tried: ['channels/(?P<channel_slug>[-\\w]+)/page/(?P<page>\\d+)/$', 'channels/(?P<channel_slug>[-\\w]+)/$']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment