

def test_get_with_user(self):
    view = ApplicationSettings.as_view()
    url = reverse('admin:app_settings', kwargs={
        'app_id': self.app.id,
    })
    request = APIRequestFactory().get(url)
    request.user = UserFactory.create()
    response = view(request, app_id=self.app.id).render()
    self.assertEqual(response.status_code, 200)
    self.assertContains(response, 'You are not the owner of this application and therefore not allowed to access this app.')

dataset/ETHPy150Open ExCiteS/geokey/geokey/applications/tests/test_views.py ApplicationSettingsTest.test_get_with_user/original