from changes.testutils import APITestCase


class AuthIndexTest(APITestCase):
    path = '/api/0/auth/'

    def test_anonymous(self):
        resp = self.client.get(self.path)
        assert resp.status_code == 200
        data = self.unserialize(resp)
        assert data['authenticated'] is False

    def test_authenticated(self):
        self.login_default()

        resp = self.client.get(self.path)
        assert resp.status_code == 200
        data = self.unserialize(resp)
        assert data['authenticated'] is True
        assert data['user'] == {
            'id': self.default_user.id.hex,
            'email': self.default_user.email,
        }

@@ -553,31 +553,17 @@
 er'%5D
- == %7B%0A            'id':
+%5B'id'%5D ==
  sel
@@ -587,62 +587,5 @@
 .hex
-,%0A            'email': self.default_user.email,%0A        %7D
 %0A

Correct auth index test