Commit 0b05c56c authored by François Ferry's avatar 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
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment