@@ -0,0 +1,1699 @@
+from __future__ import print_function, unicode_literals%0A%0Afrom aspen import json%0A%0Afrom gittip.elsewhere.twitter import TwitterAccount%0Afrom gittip.testing import Harness%0Afrom gittip.testing.client import TestClient%0A%0A%0Aclass Tests(Harness):%0A%0A    def hit_anonymous(self, method='GET', expected_code=200):%0A        user, ignored = TwitterAccount('alice', %7B%7D).opt_in('alice')%0A%0A        client = TestClient()%0A        response = client.get('/')%0A        csrf_token = response.request.context%5B'csrf_token'%5D%0A%0A        if method == 'GET':%0A            response = client.get( %22/alice/anonymous.json%22%0A                                 , user='alice'%0A                                  )%0A        else:%0A            assert method == 'POST'%0A            response = client.post( %22/alice/anonymous.json%22%0A                                  , %7B'csrf_token': csrf_token%7D%0A                                  , user='alice'%0A                                   )%0A        if response.code != expected_code:%0A            print(response.body)%0A        return response%0A%0A%0A    def test_participant_can_get_their_anonymity_setting(self):%0A        response = self.hit_anonymous('GET')%0A        actual = json.loads(response.body)%5B'anonymous'%5D%0A        assert actual is False, actual%0A%0A    def test_participant_can_toggle_their_anonymity_setting(self):%0A        response = self.hit_anonymous('POST')%0A        actual = json.loads(response.body)%5B'anonymous'%5D%0A        assert actual is True, actual%0A%0A    def test_participant_can_toggle_their_anonymity_setting_back(self):%0A        response = self.hit_anonymous('POST')%0A        response = self.hit_anonymous('POST')%0A        actual = json.loads(response.body)%5B'anonymous'%5D%0A        assert actual is False, actual%0A

Add a few tests for anonymous.json