def test_get(self):
        view = DataView(user=self.user)
        view.save()

        view.name = "Fake name"
        view.save()

        target_revision_id = Revision.objects.latest().pk

        view.description = "Terribly vague description"
        view.save()

        url = '/api/views/{0}/revisions/{1}/'.format(
            view.id, target_revision_id)

        response = self.client.get(url, HTTP_ACCEPT='application/json')
        self.assertEqual(response.status_code, codes.ok)
        self.assertTrue(response.content)

        revision = json.loads(response.content)
        self.assertEqual(revision['changes'], {
            'name': {
                'old_value': None,
                'new_value': 'Fake name'
            }
        })
        self.assertFalse("description" in revision['changes'])
dataset/ETHPy150Open chop-dbhi/serrano/tests/cases/resources/tests/view.py/ViewRevisionResourceTestCase.test_get/original