Commit 8d60dbe4 authored by Jean-Baptiste's avatar Jean-Baptiste

add json-ld accepted formats tests

parent a7b5c932
Pipeline #4781 passed with stage
in 1 minute and 21 seconds
......@@ -237,3 +237,34 @@ class Save(TestCase):
content_type='application/ld+json')
self.assertEqual(response.status_code, 201)
self.assertIn('userprofile', response.data)
def test_embedded_context(self):
body = {
'@graph': [
{
'@id': "./",
'content': "post update",
'peer_user': ""
}
],
'@context': {
"@vocab": "http://happy-dev.fr/owl/#",
}
}
response = self.client.post('/posts/', data=json.dumps(body),
content_type='application/ld+json')
self.assertEqual(response.status_code, 201)
def test_embedded_context_2(self):
body = {
'@id': "./",
'content': "post update",
'peer_user': "",
'@context': {
"@vocab": "http://happy-dev.fr/owl/#",
}
}
response = self.client.post('/posts/', data=json.dumps(body),
content_type='application/ld+json')
self.assertEqual(response.status_code, 201)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment