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

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

src/p/o/portfoliyo-HEAD/portfoliyo/tests/model/users/management/commands/test_import_users.py   portfoliyo(Download)
def test_bad_teacher_email(monkeypatch):
    mock_get = mock.Mock()
    monkeypatch.setattr(Profile.objects, 'get', mock_get)
 
    mock_get.side_effect = Profile.DoesNotExist()