def test_href_without_target(self): alert = Alert(user=User.objects.get(pk=1)) self.assertEqual(alert.href(), '')
def test_href_target(self): target = Target(url='http://www.google.com/') alert = Alert(user=User.objects.get(pk=1), target=target) self.assertEqual(alert.href(), target.href())