Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/d/j/django-oscar-HEAD/tests/functional/customer/alert_tests.py   django-oscar(Download)
        form.submit()
 
        alerts = ProductAlert.objects.filter(user=user)
        self.assertEqual(1, len(alerts))
        alert = alerts[0]
    def test_can_cancel_it(self):
        alerts = ProductAlert.objects.filter(user=self.user)
        self.assertEqual(1, len(alerts))
        alert = alerts[0]
        self.assertFalse(alert.is_cancelled)
        self.app.get(reverse('customer:alerts-cancel-by-pk',
                             kwargs={'pk': alert.pk}),
                             user=self.user)
 
        alerts = ProductAlert.objects.filter(user=self.user)
        form.submit()
 
        alerts = ProductAlert.objects.filter(email='john@smith.com')
        self.assertEqual(1, len(alerts))
        alert = alerts[0]