Skip to content
Snippets Groups Projects
Commit 42fce76a authored by Jean-Baptiste's avatar Jean-Baptiste
Browse files

Remove test_temp from git

parent e7360a56
No related branches found
No related tags found
1 merge request!165Sub object can't be updated
Pipeline #7761 passed with stage
in 44 seconds
...@@ -2,3 +2,4 @@ dist ...@@ -2,3 +2,4 @@ dist
*.egg-info *.egg-info
*.pyc *.pyc
*~ *~
djangoldp/tests/tests_temp.py
...@@ -24,8 +24,7 @@ failures = test_runner.run_tests([ ...@@ -24,8 +24,7 @@ failures = test_runner.run_tests([
'djangoldp.tests.tests_sources', 'djangoldp.tests.tests_sources',
'djangoldp.tests.tests_pagination', 'djangoldp.tests.tests_pagination',
'djangoldp.tests.tests_inbox', 'djangoldp.tests.tests_inbox',
'djangoldp.tests.tests_backlinks_service', 'djangoldp.tests.tests_backlinks_service'
'djangoldp.tests.tests_temp'
]) ])
if failures: if failures:
......
import json
from guardian.shortcuts import assign_perm
from .models import PermissionlessDummy, Dummy, Resource, UserProfile
from django.contrib.auth import get_user_model
from django.test import TestCase
from rest_framework.test import APIRequestFactory, APIClient
from djangoldp.models import LDPSource
from djangoldp.tests.models import Invoice, Circle, Conversation
from ..permissions import LDPPermissions
class TestTemp(TestCase):
def setUp(self):
self.client = APIClient()
def setUpLoggedInUser(self):
self.user = get_user_model().objects.create_user(username='john', email='jlennon@beatles.com',
password='glass onion')
self.client.force_authenticate(user=self.user)
# optional setup for testing PermissionlessDummy model with parameterised perms
def setUpGuardianDummyWithPerms(self, perms=[]):
self.dummy = PermissionlessDummy.objects.create(some='test', slug='test')
model_name = PermissionlessDummy._meta.model_name
for perm in perms:
assign_perm(perm + '_' + model_name, self.user, self.dummy)
def tearDown(self):
pass
# def test_nested_container_federated_609(self):
# resource = Resource.objects.create()
# body = {
# 'http://happy-dev.fr/owl/#@id': "http://testserver/resources/{}".format(resource.pk),
# 'http://happy-dev.fr/owl/#joboffers': [
# {
# 'http://happy-dev.fr/owl/#@id': "https://external.com/job-offers/1"
# },
# {
# 'http://happy-dev.fr/owl/#@id': "https://external.com/job-offers/2"
# }
# ]
# }
#
# response = self.client.put('/resources/{}/'.format(resource.pk),
# data=json.dumps(body),
# content_type='application/ld+json')
# self.assertEqual(response.status_code, 200)
# self.assertEqual(len(response.data['joboffers']['ldp:contains']), 2)
#
# body2 = {
# 'http://happy-dev.fr/owl/#@id': "http://testserver/resources/{}".format(resource.pk),
# 'http://happy-dev.fr/owl/#joboffers': [
# {
# 'http://happy-dev.fr/owl/#@id': "https://external.com/job-offers/1"
# },
# {
# 'http://happy-dev.fr/owl/#@id': "https://external.com/job-offers/3"
# },
# {
# 'http://happy-dev.fr/owl/#@id': "https://external.com/job-offers/4"
# }
# ]
# }
# response = self.client.put('/resources/{}/'.format(resource.pk),
# data=json.dumps(body2),
# content_type='application/ld+json')
#
# self.assertEqual(response.status_code, 200)
# self.assertEqual(len(response.data['joboffers']['ldp:contains']), 3)
#
# response = self.client.put('/resources/{}/job-offers'.format(resource.pk),
# data=json.dumps(body2),
# content_type='application/ld+json')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment