@override_settings(LOGIN_URL=reverse('login'))
    def test_admin_gallery_requires_permission(self):
        user = self.create_user()
        client = Client()
        client.login(username=user.email, password='moo')
        response = client.get(reverse('admin_gallery'))
        self.assertEqual(response.status_code, 403)
admin gallery should return 403 if user doesn't have permission.
dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_views.py/ImageViewsTest.test_admin_gallery_requires_permission