Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rights Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Polaris
Rights Engine
Commits
3d21f8a8
Commit
3d21f8a8
authored
4 months ago
by
Benjamin Ledel
Browse files
Options
Downloads
Patches
Plain Diff
Update 2 files
- /src/xapi/tests/tests.py - /src/xapi/views.py
parent
dd3567e0
No related branches found
No related tags found
No related merge requests found
Pipeline
#1561564
failed
4 months ago
Stage: test
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xapi/tests/tests.py
+2
-0
2 additions, 0 deletions
src/xapi/tests/tests.py
src/xapi/views.py
+1
-1
1 addition, 1 deletion
src/xapi/views.py
with
3 additions
and
1 deletion
src/xapi/tests/tests.py
+
2
−
0
View file @
3d21f8a8
...
...
@@ -22,6 +22,8 @@ PROJECT_PATH = os.path.abspath(os.path.dirname(__name__))
def
mock_store_in_lrs
(
x_api_statement
):
return
True
def
mock_store_in_lrs
(
x_api_statement
):
return
True
class
XAPITestCase
(
TestCase
):
test_user_email
=
"
test@mail.com
"
...
...
This diff is collapsed.
Click to expand it.
src/xapi/views.py
+
1
−
1
View file @
3d21f8a8
...
...
@@ -333,7 +333,7 @@ class CreateStatement(APIView):
except
Exception
as
e
:
if
settings
.
DEBUG
:
print
(
"
Could not forward to
"
,
additional_lrs
[
"
url
"
],
"
:
"
,
e
)
if
not
res
or
res
.
status_code
!=
200
:
if
(
not
res
or
res
.
status_code
!=
200
)
and
not
settings
.
CELERY_TASK_ALWAYS_EAGER
:
retry_forward_statements
.
delay
(
x_api_statements
,
additional_lrs
[
"
token_type
"
],
additional_lrs
[
"
token
"
],
additional_lrs
[
"
url
"
])
if
settings
.
DEBUG
:
print
(
"
Could not forward to
"
,
additional_lrs
[
"
url
"
],
"
:
"
,
res
.
reason
if
res
is
not
None
else
"
URL could not be reached
"
,
"
({})
"
.
format
(
res
.
status_code
)
if
res
is
not
None
else
""
)
...
...
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