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

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

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/village/test_forms.py   portfoliyo(Download)
 
        assert form.is_valid(), dict(form.errors)
        group = form.save()
 
        assert len(group.students.all()) == 0
        target = 'portfoliyo.tasks.record_notification.delay'
        with mock.patch(target) as mock_record_notification:
            form.save()
 
        mock_record_notification.assert_called_once_with(
 
        assert form.is_valid(), dict(form.errors)
        group = form.save()
 
        assert set(group.elders.all()) == {elder}
 
        assert form.is_valid(), dict(form.errors)
        group = form.save()
 
        assert set(group.elders.all()) == {elder}
 
        assert form.is_valid(), dict(form.errors)
        group = form.save()
 
        # this will fail if the group relationship was deleted/recreated