test: build URLs dont require the build path in the name

MR !5
This commit is contained in:
2022-01-29 14:04:05 +09:30
parent 3dd7b452a4
commit 88b80c412d
2 changed files with 8 additions and 3 deletions

View File

@ -34,6 +34,8 @@ class Data:
request_path = url.replace(request_protocol + '://','')[1:]
request_path = request_path.replace(self.suffux_path[1:], '')
return {
'url_id': url_id,
'url': url,

View File

@ -64,6 +64,12 @@ class Test:
request_path = str(data['request_path'])
if request_path[0:1] == '/':
if request_path[0:1] == request_path:
request_path = 'index.html'
else:
request_path = request_path[1:]
if '#' in request_path:
request_path_split = request_path.split('#')
request_path = str(request_path_split[0])
@ -82,9 +88,6 @@ class Test:
request_path = request_path
request_path = request_path.replace('/' + path_suffix[1:] + '/','')
request_path = request_path.replace(path_suffix[1:] + '/','')
print('DEBUG consructed path:' + request_path)
assert request_path in self.source_files, (