Commit ff08cdcc authored by Jean-Baptiste's avatar Jean-Baptiste

Merge branch '165-sub-container' into 'master'

update: improve tests

Closes #165

See merge request !92
parents f7c8acb7 28cc19c8
Pipeline #5181 passed with stage
in 1 minute and 26 seconds
...@@ -258,7 +258,7 @@ class Save(TestCase): ...@@ -258,7 +258,7 @@ class Save(TestCase):
def test_nested_container(self): def test_nested_container(self):
resource = Resource.objects.create() resource = Resource.objects.create()
body = { body = {
'title': "new job", 'http://happy-dev.fr/owl/#title': "new job",
} }
response = self.client.post('/resources/{}/joboffers/'.format(resource.pk), response = self.client.post('/resources/{}/joboffers/'.format(resource.pk),
...@@ -266,6 +266,7 @@ class Save(TestCase): ...@@ -266,6 +266,7 @@ class Save(TestCase):
content_type='application/ld+json') content_type='application/ld+json')
self.assertEqual(response.status_code, 201) self.assertEqual(response.status_code, 201)
self.assertEqual(response.data['resources']['ldp:contains'][0]['@id'], "http://testserver/resources/{}/".format(resource.pk)) self.assertEqual(response.data['resources']['ldp:contains'][0]['@id'], "http://testserver/resources/{}/".format(resource.pk))
self.assertEqual(response.data['title'], "new job")
def test_embedded_context_2(self): def test_embedded_context_2(self):
body = { body = {
......
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