def login_only_admin(self):
        user = get_user_model().objects.create_user(
            username='test', email='test@email.com', password='password')
        user.user_permissions.add(Permission.objects.get_by_natural_key(
            codename='access_admin', app_label='wagtailadmin', model='admin'))
        self.assertTrue(self.client.login(username='test', password='password'))
        return user
Return the file's current position, if applicable. This method throws
dataset/ETHPy150Open torchbox/wagtail/wagtail/contrib/settings/tests/test_admin.py/TestSettingMenu.login_only_admin--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/grizzled/grizzled/io/__init__.py/PushbackFile.tell