@@ -28,7 +28,7 @@ class TestQgsServerTwoLayer(unittest.TestCase):
28
28
29
29
def setUp (self ):
30
30
"""Create the server instance"""
31
- self .testdata_path = unitTestDataPath ('qgis_server' ) + '/'
31
+ self .testdata_path = unitTestDataPath ('qgis_server' )
32
32
33
33
env_vars = ['QUERY_STRING' , 'QGIS_PROJECT_FILE' ]
34
34
for ev in env_vars :
@@ -49,7 +49,7 @@ def assert_headers(self, header, body):
49
49
def result_compare (self , file_name , error_msg_header , header , body ):
50
50
self .assert_headers (header , body )
51
51
response = header + body
52
- f = open (self .testdata_path + file_name )
52
+ f = open (os . path . join ( self .testdata_path , file_name ) )
53
53
expected = f .read ()
54
54
f .close ()
55
55
# Store the output for debug or to regenerate the reference documents:
@@ -69,8 +69,8 @@ def result_compare(self, file_name, error_msg_header, header, body):
69
69
unicode (response , errors = 'replace' )))
70
70
71
71
def wfs_getfeature_post_compare (self , requestid , request ):
72
- project = self .testdata_path + "test_project_two_layers.qgs"
73
- assert os .path .exists (project ), "Project file not found: " + project
72
+ project = os . path . join ( self .testdata_path , "test_project_two_layers.qgs" )
73
+ self . assertTrue ( os .path .exists (project ), msg = u "Project file not found: %s" % ( project ))
74
74
75
75
query_string = 'MAP={}' .format (urllib .quote (project ))
76
76
self .server .putenv ("REQUEST_METHOD" , "POST" )
0 commit comments