'Users should only be allowed to read their own data.'

def test_read_permissions(self):

    user = UserFactory()
    datum = ExperimentDataFactory(user=user)
    url = reverse('api_experiments:v0:data-detail', kwargs={'pk': datum.id})
    response = self.client.get(url)
    self.assertEqual(response.status_code, 401)
    self.client.login(username=user.username, password=UserFactory._DEFAULT_PASSWORD)
    response = self.client.get(url)
    self.assertEqual(response.status_code, 200)
    other_user = UserFactory()
    self.client.login(username=other_user.username, password=UserFactory._DEFAULT_PASSWORD)
    response = self.client.get(url)
    self.assertEqual(response.status_code, 404)
