Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
saem_ref
Commits
88fe2b6536fc
Commit
0b05c56c
authored
Jun 02, 2022
by
François Ferry
Browse files
test: use BASE_URL instead of hard coded url for test domain
related:
cubicweb/cubicweb#374
parent
ef85d8ab0b0b
Pipeline
#133589
failed with stages
in 3 minutes and 57 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
test/test_views.py
View file @
88fe2b65
...
...
@@ -25,7 +25,7 @@ import unittest
from
yams.schema
import
role_name
from
cubicweb.devtools
import
PostgresApptestConfiguration
from
cubicweb.devtools
import
PostgresApptestConfiguration
,
BASE_URL
from
cubicweb.devtools.testlib
import
CubicWebTC
from
cubicweb_skos.rdfio
import
default_graph
...
...
@@ -156,11 +156,11 @@ class FuncViewsTC(CubicWebTC):
concept
=
scheme
.
reverse_in_scheme
[
0
]
cnx
.
commit
()
ark
=
concept
.
ark
url
=
'http://testing.fr/cubicweb/
view'
url
=
f
'
{
BASE_URL
}
view'
data
=
{
'rql'
:
'toto'
,
'__fromsearchbox'
:
'1'
,
'subvid'
:
'tsearch'
}
html
=
self
.
http_publish
(
url
,
data
=
data
)[
0
].
decode
(
'utf-8'
)
self
.
assertIn
(
'<a href="
http://testing.fr/cubicweb/
ark:/{}?highlight=toto" title="">'
.
format
(
ark
),
'<a href="
{}
ark:/{}?highlight=toto" title="">'
.
format
(
BASE_URL
,
ark
),
html
)
def
test_skos_negociation
(
self
):
...
...
@@ -638,7 +638,7 @@ class BaseViewsTC(CubicWebTC):
path
=
'{}?{}'
.
format
(
path
,
'&'
.
join
([
'{}={}'
.
format
(
k
,
v
)
for
k
,
v
in
kwargs
.
items
()]))
parts
.
append
(
' <a href="
http://testing.fr/cubicweb/
{}">Create one?</a>'
.
format
(
path
)
' <a href="
{}
{}">Create one?</a>'
.
format
(
BASE_URL
,
path
)
)
parts
.
append
(
'</div>'
)
return
''
.
join
(
parts
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment