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

All Samples(13)  |  Call(13)  |  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)
        profile = form.save()
 
        assert set(profile.elders) == {rel.elder, other_rel.elder}
 
        assert form.is_valid(), dict(form.errors)
        profile = form.save()
 
        assert set(profile.elders) == {rel.elder, parent_rel.elder}
 
        assert form.is_valid(), dict(form.errors)
        profile = form.save()
 
        assert set(profile.elders) == {rel.elder, owner_rel.elder}
 
        assert form.is_valid(), dict(form.errors)
        profile = form.save()
 
        assert set(profile.elders) == {rel.elder}
        target = 'portfoliyo.pusher.events.student_removed'
        with mock.patch(target) as mock_student_removed:
            profile = form.save()
 
        mock_student_removed.assert_called_with(profile.id, [other_rel.elder.id])