def test_authenticated(self):
        """Test the authenticated/anonymous switch."""
        Flag.objects.create(name='myflag', authenticated=True)

        request = get()
        response = process_request(request, views.flag_in_view)
        self.assertEqual(b'off', response.content)
        assert 'dwf_myflag' not in response.cookies

        request.user = User(username='foo')
        assert request.user.is_authenticated()
        response = process_request(request, views.flag_in_view)
        self.assertEqual(b'on', response.content)
        assert response.cookies not in 'dwf_myflag'
dataset/ETHPy150Open jsocol/django-waffle/waffle/tests/test_waffle.py/WaffleTests.test_authenticated/swapped operands of `not in`