Commit c7227646 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

check that private ds remains invisible for curators

parent de3923f3
......@@ -1078,6 +1078,14 @@ class DataSourceMappingEditTestCase(ViewTestCase):
business_process.set_curator(self.toto, False)
self.assertEqual(self.client.get(url).status_code, 404)
self.public_data_source_of_user.public = False
self.public_data_source_of_user.save()
business_process.set_curator(self.toto, True)
self.assertEqual(self.client.get(url).status_code, 404, "Curators cannot see private ds")
business_process.set_curator(self.toto, False)
self.public_data_source_of_user.public = True
self.public_data_source_of_user.save()
self.client.force_login(self.user)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
......@@ -2021,6 +2029,14 @@ class DataSourceRangeMappingEditTestCase(ViewTestCase):
business_process.set_curator(self.toto, False)
self.assertEqual(self.client.get(url).status_code, 404)
self.public_data_source_of_user.public = False
self.public_data_source_of_user.save()
business_process.set_curator(self.toto, True)
self.assertEqual(self.client.get(url).status_code, 404, "Curators cannot see private ds")
business_process.set_curator(self.toto, False)
self.public_data_source_of_user.public = True
self.public_data_source_of_user.save()
self.client.force_login(self.user)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
......
Supports Markdown
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