Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djangoldp
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
djangoldp-packages
djangoldp
Commits
42fce76a
Commit
42fce76a
authored
4 years ago
by
Jean-Baptiste
Browse files
Options
Downloads
Patches
Plain Diff
Remove test_temp from git
parent
e7360a56
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!165
Sub object can't be updated
Pipeline
#7761
passed with stage
Stage: test
in 44 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
djangoldp/tests/runner.py
+1
-2
1 addition, 2 deletions
djangoldp/tests/runner.py
djangoldp/tests/tests_temp.py
+0
-80
0 additions, 80 deletions
djangoldp/tests/tests_temp.py
with
2 additions
and
82 deletions
.gitignore
+
1
−
0
View file @
42fce76a
...
@@ -2,3 +2,4 @@ dist
...
@@ -2,3 +2,4 @@ dist
*.egg-info
*.egg-info
*.pyc
*.pyc
*~
*~
djangoldp/tests/tests_temp.py
This diff is collapsed.
Click to expand it.
djangoldp/tests/runner.py
+
1
−
2
View file @
42fce76a
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
djangoldp/tests/tests_temp.py
deleted
100644 → 0
+
0
−
80
View file @
e7360a56
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')
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment