def test_create_nested_person_links_authorized(self):
        person_data = {
            "id":"ab1a5788e5bae955c048748fa6af0e97",
            "contact_details":[
                {
                    "id": "a66cb422-eec3-4861-bae1-a64ae5dbde61",
                    "links": [{
                        "url": "http://facebook.com",
                    }]
                }
            ],
        }
        token = Token.objects.get(user__username="admin")
        self.client.credentials(HTTP_AUTHORIZATION='Token ' + token.key)
        response = self.client.put("/en/persons/ab1a5788e5bae955c048748fa6af0e97/", person_data)
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        person_ = Person.objects.language('en').get(id='ab1a5788e5bae955c048748fa6af0e97')
        # There should be only 1 links in that contact
        contact = person_.contact_details.language('en').get(id='a66cb422-eec3-4861-bae1-a64ae5dbde61')
        links = contact.links.language('en').all()
        check = False
        for i in links:
            if i.url == "http://sinarproject.org":
                check = True
        self.assertTrue(check, "http://sinarproject.org does not exist")