1. Owen Nelson
  2. django-trawler

Commits

Owen Nelson  committed c6bb8ef

updating tests for new url patterns

  • Participants
  • Parent commits 7fbcd0d
  • Branches default

Comments (0)

Files changed (1)

File src/trawler/tests.py

View file
  • Ignore whitespace
     def test_image_hit(self):
         self.assertFalse(Target.objects.get(pk=self.target_pk).image_viewed)
         # note: we pass the 2nd arg to satisfy the open-ended regex
-        self.c.get(reverse('img_hits', args=(self.target_pk, 'baz.png',)))
+        self.c.get(reverse('img_hits', kwargs={'target_id': self.target_pk,
+                                               'campaign_id': self.campaign.pk}))
         self.assertTrue(Target.objects.get(pk=self.target_pk).image_viewed)
 
     def test_link_hit(self):
         self.assertFalse(Target.objects.get(pk=self.target_pk).link_followed)
         # note: we pass the 2nd arg to satisfy the open-ended regex
-        self.c.get(reverse('link_hits', args=(self.target_pk, 'baz.html',)))
+        self.c.get(reverse('link_hits', kwargs={'target_id': self.target_pk,
+                                                'campaign_id': self.campaign.pk}))
         self.assertTrue(Target.objects.get(pk=self.target_pk).link_followed)
 
 class EmailTests(TestCase):