Skip to content

Commit

Permalink
https://github.com/gitcoinco/web/issues/987
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Apr 26, 2018
1 parent 7c1ad33 commit c9ba80a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/app/tests/test_app_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def test_sitemap_resolve(self):
def test_email_settings_reverse(self):
"""Test the email_settings url and check the reverse."""
priv_key = token_hex(16)[:29]
self.assertEqual(reverse('email_settings', args=(priv_key, )), f'/email/settings/{priv_key}')
self.assertEqual(reverse('email_settings', args=(priv_key, )), f'/settings/email/{priv_key}')

def test_email_settings_resolve(self):
"""Test the email_settings url and check the resolution."""
self.assertEqual(resolve('/email/settings/').view_name, 'email_settings')
self.assertEqual(resolve('/settings/email/').view_name, 'email_settings')

def test_leaderboard_reverse(self):
"""Test the leaderboard url and check the reverse."""
Expand Down
6 changes: 3 additions & 3 deletions app/dashboard/tests/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ def setUp(self):
def test_build_github_notification_new_bounty(self):
"""Test the dashboard helper build_github_notification method with new_bounty."""
message = build_github_notification(self.bounty, 'new_bounty')
assert message.startswith(f'__This issue now has a funding of {self.natural_value} {self.bounty.token_name}')
assert f'__This issue now has a funding of {self.natural_value} {self.bounty.token_name}' in message
assert self.usdt_value in message
assert f'[here]({self.absolute_url})' in message
assert f'${self.amount_open_work}' in message

def test_build_github_notification_killed_bounty(self):
"""Test the dashboard helper build_github_notification method with killed_bounty."""
message = build_github_notification(self.bounty, 'killed_bounty')
assert message.startswith(f"__The funding of {self.natural_value} {self.bounty.token_name} {self.usdt_value}")
assert f"__The funding of {self.natural_value} {self.bounty.token_name} {self.usdt_value}" in message
assert 'Questions?' in message
assert f'${self.amount_open_work}' in message

def test_build_github_notification_increased_bounty(self):
"""Test the dashboard helper build_github_notification method with new_bounty."""
message = build_github_notification(self.bounty, 'increased_bounty')
assert message.startswith(f'__The funding of this issue was increased to {self.natural_value} {self.bounty.token_name}')
assert f'__The funding of this issue was increased to {self.natural_value} {self.bounty.token_name}' in message
assert self.usdt_value in message
assert f'[here]({self.absolute_url})' in message
assert f'${self.amount_open_work}' in message
Expand Down

0 comments on commit c9ba80a

Please sign in to comment.